VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{7B78673D-6A82-11D7-ADA7-887C5F370755}#1.0#0"; "menu.ocx"
Object = "{736A8444-E374-41A8-B526-1B07FD2F3F5B}#1.0#0"; "BLacKPeaRLOCX.ocx"
Begin VB.Form FrmMain 
   BackColor       =   &H00000000&
   Caption         =   "BLacK PeaRL Billing Server v.1.3"
   ClientHeight    =   10710
   ClientLeft      =   330
   ClientTop       =   810
   ClientWidth     =   15240
   Icon            =   "FrmMain.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   10710
   ScaleWidth      =   15240
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox txtjeda 
      Height          =   285
      Left            =   5040
      TabIndex        =   85
      Top             =   720
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.TextBox txtnoclient 
      Height          =   285
      Left            =   5040
      TabIndex        =   53
      Top             =   480
      Visible         =   0   'False
      Width           =   375
   End
   Begin BLacKPeaRLOCX.BLacKFrame Exp 
      Height          =   8415
      Left            =   50
      TabIndex        =   34
      Top             =   1320
      Visible         =   0   'False
      Width           =   2175
      _ExtentX        =   3836
      _ExtentY        =   14843
      BackColor1      =   4210752
      BackColor2      =   0
      Caption         =   "  Explore My Billing"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   32768
      TextPosition    =   0
      TitleColor1     =   8421504
      TitleColor2     =   0
      TitleGradient   =   2
      TitleHeight     =   350
      BorderColor     =   49152
      RoundAngle      =   2
      BorderWidth     =   2
      Begin BLacKPeaRLOCX.ButtonNix ButtonNix3 
         Height          =   195
         Left            =   1560
         TabIndex        =   0
         Top             =   80
         Width           =   495
         _ExtentX        =   873
         _ExtentY        =   344
         BTYPE           =   5
         TX              =   "X"
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   255
         FCOLO           =   255
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":74F2
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin MSComctlLib.ImageList ImgList 
         Left            =   2280
         Top             =   360
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   16
         ImageHeight     =   16
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   2
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmMain.frx":750E
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "FrmMain.frx":7F20
               Key             =   ""
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.TreeView TreeOP 
         Height          =   8010
         Left            =   0
         TabIndex        =   35
         Top             =   360
         Width           =   2220
         _ExtentX        =   3916
         _ExtentY        =   14129
         _Version        =   393217
         Indentation     =   141
         LabelEdit       =   1
         LineStyle       =   1
         Style           =   7
         ImageList       =   "ImgList"
         Appearance      =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         MouseIcon       =   "FrmMain.frx":8932
      End
   End
   Begin VB.Timer TimerAktif 
      Interval        =   1000
      Left            =   720
      Top             =   10080
   End
   Begin MSWinsockLib.Winsock Winsock 
      Index           =   0
      Left            =   360
      Top             =   10080
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
   End
   Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame3 
      Height          =   1215
      Left            =   5400
      TabIndex        =   1
      Top             =   45
      Width           =   9795
      _ExtentX        =   17277
      _ExtentY        =   2143
      BackColor1      =   0
      BackColor2      =   4210752
      Caption         =   ""
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   255
      TitleColor1     =   2565927
      TitleColor2     =   2565927
      TitleGradient   =   0
      TitleHeight     =   350
      BorderColor     =   49152
      BorderWidth     =   2
      Begin VB.Label Txtalamat2 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "BLacK PeaRL Cyber Community TM"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   255
         Left            =   0
         TabIndex        =   4
         Top             =   840
         Width           =   9735
      End
      Begin VB.Label Txtalamat1 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "Jl. Cyber World Wide Web"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   255
         Left            =   0
         TabIndex        =   3
         Top             =   480
         Width           =   9735
      End
      Begin VB.Label Txtnama_warnet 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "BLaCk PeaRL Internet Cafe"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   15.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   375
         Left            =   0
         TabIndex        =   2
         Top             =   120
         Width           =   9735
      End
   End
   Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame2 
      Height          =   8415
      Left            =   2280
      TabIndex        =   5
      Top             =   1320
      Width           =   12900
      _ExtentX        =   22754
      _ExtentY        =   14843
      BackColor1      =   2565927
      BackColor2      =   0
      BackGradient    =   0
      Caption         =   ""
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   49152
      TitleColor1     =   2565927
      TitleColor2     =   2565927
      TitleGradient   =   0
      TitleHeight     =   350
      BorderColor     =   49152
      BorderWidth     =   2
      Begin VB.CheckBox chksound 
         Appearance      =   0  'Flat
         BackColor       =   &H00008000&
         Caption         =   "Sound"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   11280
         Style           =   1  'Graphical
         TabIndex        =   87
         Top             =   5880
         Width           =   1455
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdHideview 
         Height          =   375
         Left            =   5880
         TabIndex        =   84
         ToolTipText     =   "Lihat tanggal disini"
         Top             =   7920
         Width           =   1215
         _ExtentX        =   2143
         _ExtentY        =   661
         BTYPE           =   5
         TX              =   "Hide"
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":1E4FB
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.BLacKFrame FrameBayar 
         Height          =   5055
         Left            =   3120
         TabIndex        =   60
         Top             =   1080
         Visible         =   0   'False
         Width           =   6135
         _ExtentX        =   10821
         _ExtentY        =   8916
         BackColor1      =   0
         BackGradient    =   0
         Caption         =   "Pembayaran"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   49152
         TitleColor1     =   2565927
         TitleGradient   =   0
         BorderColor     =   49152
         BorderWidth     =   2
         Begin BLacKPeaRLOCX.ButtonNix CmdAddPenjs 
            Height          =   255
            Left            =   120
            TabIndex        =   86
            ToolTipText     =   "Klik disini jika client sudah membayar"
            Top             =   3720
            Width           =   5895
            _ExtentX        =   10398
            _ExtentY        =   450
            BTYPE           =   5
            TX              =   "Tambah Penjualan/Jasa"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmMain.frx":1E517
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
         Begin VB.TextBox txtsel 
            BackColor       =   &H00404040&
            BorderStyle     =   0  'None
            ForeColor       =   &H0000C000&
            Height          =   285
            Left            =   4440
            Locked          =   -1  'True
            TabIndex        =   74
            Top             =   840
            Width           =   1455
         End
         Begin VB.TextBox txtdur 
            BackColor       =   &H00404040&
            BorderStyle     =   0  'None
            ForeColor       =   &H0000C000&
            Height          =   285
            Left            =   4440
            Locked          =   -1  'True
            TabIndex        =   73
            Top             =   1200
            Width           =   1455
         End
         Begin VB.TextBox txttot 
            BackColor       =   &H00404040&
            BorderStyle     =   0  'None
            ForeColor       =   &H0000C000&
            Height          =   285
            Left            =   4440
            Locked          =   -1  'True
            TabIndex        =   72
            Top             =   1560
            Width           =   1455
         End
         Begin VB.TextBox txtstart 
            BackColor       =   &H00404040&
            BorderStyle     =   0  'None
            ForeColor       =   &H0000C000&
            Height          =   285
            Left            =   4440
            Locked          =   -1  'True
            TabIndex        =   71
            Top             =   480
            Width           =   1455
         End
         Begin VB.TextBox txtjen 
            BackColor       =   &H00404040&
            BorderStyle     =   0  'None
            ForeColor       =   &H0000C000&
            Height          =   285
            Left            =   1200
            Locked          =   -1  'True
            TabIndex        =   70
            Top             =   1560
            Width           =   1575
         End
         Begin VB.TextBox txtnota 
            BackColor       =   &H00404040&
            BorderStyle     =   0  'None
            ForeColor       =   &H0000C000&
            Height          =   285
            Left            =   1200
            Locked          =   -1  'True
            TabIndex        =   69
            Top             =   480
            Width           =   615
         End
         Begin VB.TextBox txtws 
            BackColor       =   &H00404040&
            BorderStyle     =   0  'None
            ForeColor       =   &H0000C000&
            Height          =   285
            Left            =   1200
            Locked          =   -1  'True
            TabIndex        =   68
            Top             =   840
            Width           =   1575
         End
         Begin VB.TextBox txtnamacli 
            BackColor       =   &H00404040&
            BorderStyle     =   0  'None
            ForeColor       =   &H0000C000&
            Height          =   285
            Left            =   1200
            Locked          =   -1  'True
            TabIndex        =   67
            Top             =   1200
            Width           =   1575
         End
         Begin BLacKPeaRLOCX.ButtonNix CmdBayar 
            Height          =   375
            Left            =   120
            TabIndex        =   66
            ToolTipText     =   "Klik disini jika client sudah membayar"
            Top             =   4440
            Width           =   1215
            _ExtentX        =   2143
            _ExtentY        =   661
            BTYPE           =   5
            TX              =   "Bayar"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmMain.frx":1E533
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
         Begin BLacKPeaRLOCX.ButtonNix CmdPrint 
            Height          =   375
            Left            =   3240
            TabIndex        =   65
            ToolTipText     =   "Otomatis cetak nota"
            Top             =   4440
            Width           =   1215
            _ExtentX        =   2143
            _ExtentY        =   661
            BTYPE           =   5
            TX              =   "Cetak Nota"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   12648447
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmMain.frx":1E54F
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
         Begin BLacKPeaRLOCX.ButtonNix CmdTutup 
            Height          =   375
            Left            =   4800
            TabIndex        =   64
            ToolTipText     =   "Tutup dari pembayaran"
            Top             =   4440
            Width           =   1215
            _ExtentX        =   2143
            _ExtentY        =   661
            BTYPE           =   5
            TX              =   "Tutup"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmMain.frx":1E56B
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
         Begin VB.OptionButton chkawal 
            Caption         =   "Harga Per 30/Meni"
            Height          =   255
            Left            =   240
            TabIndex        =   63
            Top             =   48000
            Width           =   1935
         End
         Begin BLacKPeaRLOCX.ButtonNix cmdHapus 
            Height          =   375
            Left            =   1680
            TabIndex        =   62
            ToolTipText     =   "Klik disini jika client sudah membayar"
            Top             =   4440
            Width           =   1215
            _ExtentX        =   2143
            _ExtentY        =   661
            BTYPE           =   5
            TX              =   "Hapus"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmMain.frx":1E587
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
         Begin ComctlLib.ListView lvbar 
            Height          =   1575
            Left            =   120
            TabIndex        =   61
            ToolTipText     =   "Klik kanan untuk menghapus barang"
            Top             =   2040
            Width           =   5895
            _ExtentX        =   10398
            _ExtentY        =   2778
            View            =   3
            LabelWrap       =   -1  'True
            HideSelection   =   -1  'True
            _Version        =   327682
            ForeColor       =   49152
            BackColor       =   0
            BorderStyle     =   1
            Appearance      =   1
            NumItems        =   6
            BeginProperty ColumnHeader(1) {0713E8C7-850A-101B-AFC0-4210102A8DA7} 
               Key             =   ""
               Object.Tag             =   ""
               Text            =   "No"
               Object.Width           =   265
            EndProperty
            BeginProperty ColumnHeader(2) {0713E8C7-850A-101B-AFC0-4210102A8DA7} 
               SubItemIndex    =   1
               Key             =   ""
               Object.Tag             =   ""
               Text            =   "Nama Barang"
               Object.Width           =   3175
            EndProperty
            BeginProperty ColumnHeader(3) {0713E8C7-850A-101B-AFC0-4210102A8DA7} 
               SubItemIndex    =   2
               Key             =   ""
               Object.Tag             =   ""
               Text            =   "Harga"
               Object.Width           =   1764
            EndProperty
            BeginProperty ColumnHeader(4) {0713E8C7-850A-101B-AFC0-4210102A8DA7} 
               SubItemIndex    =   3
               Key             =   ""
               Object.Tag             =   ""
               Text            =   "Qty"
               Object.Width           =   529
            EndProperty
            BeginProperty ColumnHeader(5) {0713E8C7-850A-101B-AFC0-4210102A8DA7} 
               SubItemIndex    =   4
               Key             =   ""
               Object.Tag             =   ""
               Text            =   "Total"
               Object.Width           =   1940
            EndProperty
            BeginProperty ColumnHeader(6) {0713E8C7-850A-101B-AFC0-4210102A8DA7} 
               SubItemIndex    =   5
               Key             =   ""
               Object.Tag             =   ""
               Text            =   "Hargabel"
               Object.Width           =   0
            EndProperty
         End
         Begin VB.Label Label27 
            BackStyle       =   0  'Transparent
            Caption         =   "Jenis"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   240
            TabIndex        =   83
            Top             =   1560
            Width           =   1335
         End
         Begin VB.Label Label25 
            BackStyle       =   0  'Transparent
            Caption         =   "Selesai Jam"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   3480
            TabIndex        =   82
            Top             =   840
            Width           =   1335
         End
         Begin VB.Label Label24 
            BackStyle       =   0  'Transparent
            Caption         =   "Mulai Jam"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   3480
            TabIndex        =   81
            Top             =   480
            Width           =   1335
         End
         Begin VB.Label Label23 
            BackStyle       =   0  'Transparent
            Caption         =   "Total Jasa"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   3480
            TabIndex        =   80
            Top             =   1560
            Width           =   855
         End
         Begin VB.Label Label22 
            BackStyle       =   0  'Transparent
            Caption         =   "Durasi"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   3480
            TabIndex        =   79
            Top             =   1200
            Width           =   1335
         End
         Begin VB.Label Label21 
            BackStyle       =   0  'Transparent
            Caption         =   "Nama Client"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   240
            TabIndex        =   78
            Top             =   1200
            Width           =   1335
         End
         Begin VB.Label Label20 
            BackStyle       =   0  'Transparent
            Caption         =   "WStation"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   240
            TabIndex        =   77
            Top             =   840
            Width           =   855
         End
         Begin VB.Label Label19 
            BackStyle       =   0  'Transparent
            Caption         =   "No Nota"
            ForeColor       =   &H0000C000&
            Height          =   255
            Left            =   240
            TabIndex        =   76
            Top             =   480
            Width           =   1335
         End
         Begin VB.Label lbltot 
            BackStyle       =   0  'Transparent
            Caption         =   "Total bayar"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   -1  'True
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H0000C000&
            Height          =   195
            Left            =   120
            TabIndex        =   75
            Top             =   4080
            Width           =   5955
         End
      End
      Begin BLacKPeaRLOCX.BLacKFrame frmstyle 
         Height          =   1695
         Left            =   3960
         TabIndex        =   56
         Top             =   480
         Visible         =   0   'False
         Width           =   3615
         _ExtentX        =   6376
         _ExtentY        =   2990
         BackColor1      =   0
         BackGradient    =   0
         Caption         =   "Change Styles"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   49152
         TitleColor1     =   2565927
         TitleGradient   =   0
         BorderColor     =   49152
         BorderWidth     =   2
         Begin VB.ComboBox cbostyle 
            BackColor       =   &H00000000&
            ForeColor       =   &H0000C000&
            Height          =   315
            Left            =   360
            TabIndex        =   59
            Text            =   "Select Style"
            Top             =   480
            Width           =   2895
         End
         Begin BLacKPeaRLOCX.ButtonNix cdclosest 
            Height          =   375
            Left            =   2160
            TabIndex        =   58
            ToolTipText     =   "Batal untuk ubah tampilan"
            Top             =   960
            Width           =   1095
            _ExtentX        =   1931
            _ExtentY        =   661
            BTYPE           =   5
            TX              =   "Close"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmMain.frx":1E5A3
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
         Begin BLacKPeaRLOCX.ButtonNix cmdchange 
            Height          =   375
            Left            =   360
            TabIndex        =   57
            ToolTipText     =   "Ubah Tampilan"
            Top             =   960
            Width           =   1095
            _ExtentX        =   1931
            _ExtentY        =   661
            BTYPE           =   5
            TX              =   "Change"
            ENAB            =   -1  'True
            BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            COLTYPE         =   2
            FOCUSR          =   0   'False
            BCOL            =   1184274
            BCOLO           =   16777215
            FCOL            =   49152
            FCOLO           =   49152
            MCOL            =   12632256
            MPTR            =   1
            MICON           =   "FrmMain.frx":1E5BF
            UMCOL           =   -1  'True
            SOFT            =   0   'False
            PICPOS          =   0
            NGREY           =   0   'False
            FX              =   0
            HAND            =   0   'False
            CHECK           =   0   'False
            VALUE           =   0   'False
         End
      End
      Begin MSFlexGridLib.MSFlexGrid MSFlexGrid 
         Height          =   5655
         Left            =   120
         TabIndex        =   55
         Top             =   120
         Width           =   12615
         _ExtentX        =   22251
         _ExtentY        =   9975
         _Version        =   393216
         Rows            =   60
         Cols            =   11
         BackColor       =   0
         ForeColor       =   12648384
         BackColorFixed  =   3223853
         ForeColorFixed  =   32768
         BackColorSel    =   16711680
         ForeColorSel    =   8421504
         BackColorBkg    =   0
         GridColor       =   16384
         GridColorFixed  =   16384
         GridLinesFixed  =   1
         AllowUserResizing=   1
         Appearance      =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdLstct 
         Height          =   375
         Left            =   2520
         TabIndex        =   43
         Top             =   7920
         Width           =   2415
         _ExtentX        =   4260
         _ExtentY        =   661
         BTYPE           =   5
         TX              =   ""
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":1E5DB
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix CmdTanggal 
         Height          =   375
         Left            =   8040
         TabIndex        =   38
         ToolTipText     =   "Lihat tanggal disini"
         Top             =   7920
         Width           =   1215
         _ExtentX        =   2143
         _ExtentY        =   661
         BTYPE           =   5
         TX              =   ""
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":1E5F7
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdjam 
         Height          =   375
         Left            =   11520
         TabIndex        =   37
         ToolTipText     =   "Lihat jam disini"
         Top             =   7920
         Width           =   1215
         _ExtentX        =   2143
         _ExtentY        =   661
         BTYPE           =   5
         TX              =   ""
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":1E613
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdStatus 
         Height          =   375
         Left            =   120
         TabIndex        =   36
         Top             =   7920
         Width           =   2415
         _ExtentX        =   4260
         _ExtentY        =   661
         BTYPE           =   5
         TX              =   ""
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":1E62F
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.BLacKFrame framejam 
         Height          =   495
         Left            =   10320
         TabIndex        =   33
         Top             =   7440
         Visible         =   0   'False
         Width           =   2415
         _ExtentX        =   4260
         _ExtentY        =   873
         BackColor1      =   0
         BackGradient    =   0
         Caption         =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   49152
         TitleColor1     =   2565927
         TitleGradient   =   0
         BorderColor     =   49152
         BorderWidth     =   2
      End
      Begin VB.TextBox txtpath 
         Height          =   285
         Left            =   9600
         TabIndex        =   32
         Top             =   8040
         Visible         =   0   'False
         Width           =   1575
      End
      Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame7 
         Height          =   1575
         Left            =   11280
         TabIndex        =   31
         Top             =   6240
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   2778
         BackColor1      =   0
         BackColor2      =   8421504
         Caption         =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         TextPosition    =   0
         TitleColor1     =   8421504
         TitleColor2     =   0
         TitleGradient   =   2
         BorderColor     =   49152
         Begin VB.Image Foto 
            Height          =   1455
            Left            =   45
            Stretch         =   -1  'True
            ToolTipText     =   "Gimana penampilanku, hehehe =))"
            Top             =   45
            Width           =   1365
         End
      End
      Begin BLacKPeaRLOCX.BLacKFrame frametanggal 
         Height          =   495
         Left            =   5880
         TabIndex        =   30
         Top             =   7440
         Visible         =   0   'False
         Width           =   3375
         _ExtentX        =   5953
         _ExtentY        =   873
         BackColor1      =   0
         BackGradient    =   0
         Caption         =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   49152
         TitleColor1     =   2565927
         TitleGradient   =   0
         BorderColor     =   49152
         BorderWidth     =   2
      End
      Begin VB.ComboBox TxtTahun 
         BackColor       =   &H00000000&
         ForeColor       =   &H0000C000&
         Height          =   315
         Left            =   6240
         TabIndex        =   28
         Top             =   5880
         Width           =   1215
      End
      Begin VB.ComboBox TxtBulan 
         BackColor       =   &H00000000&
         ForeColor       =   &H0000C000&
         Height          =   315
         Left            =   4320
         TabIndex        =   27
         Top             =   5880
         Width           =   1695
      End
      Begin VB.ComboBox TxtTgl 
         Appearance      =   0  'Flat
         BackColor       =   &H00000000&
         ForeColor       =   &H0000C000&
         Height          =   315
         Left            =   3360
         TabIndex        =   26
         Top             =   5880
         Width           =   735
      End
      Begin MSFlexGridLib.MSFlexGrid GridStatusBayar 
         Height          =   1620
         Left            =   120
         TabIndex        =   25
         Top             =   6240
         Width           =   11055
         _ExtentX        =   19500
         _ExtentY        =   2858
         _Version        =   393216
         Rows            =   60
         Cols            =   11
         BackColor       =   0
         ForeColor       =   12648384
         BackColorFixed  =   3158064
         ForeColorFixed  =   32768
         BackColorSel    =   16711680
         ForeColorSel    =   8421504
         BackColorBkg    =   0
         GridColor       =   16384
         GridColorFixed  =   16384
         GridLinesFixed  =   1
         AllowUserResizing=   1
         Appearance      =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame6 
         Height          =   495
         Left            =   10440
         TabIndex        =   23
         Top             =   3720
         Visible         =   0   'False
         Width           =   1695
         _ExtentX        =   2990
         _ExtentY        =   873
         BackColor1      =   0
         BackColor2      =   0
         BackGradient    =   0
         Caption         =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   255
         TitleColor1     =   2565927
         TitleColor2     =   0
         TitleGradient   =   0
         TitleHeight     =   200
         BorderColor     =   192
         Begin VB.OptionButton OpHari 
            BackColor       =   &H00000000&
            Caption         =   "Per Hari"
            ForeColor       =   &H000000FF&
            Height          =   255
            Left            =   120
            MaskColor       =   &H00000000&
            Style           =   1  'Graphical
            TabIndex        =   24
            Top             =   120
            Value           =   -1  'True
            Width           =   1455
         End
      End
      Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame5 
         Height          =   495
         Left            =   10440
         TabIndex        =   21
         Top             =   3720
         Visible         =   0   'False
         Width           =   1695
         _ExtentX        =   2990
         _ExtentY        =   873
         BackColor1      =   0
         BackColor2      =   0
         BackGradient    =   0
         Caption         =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   255
         TitleColor1     =   4210752
         TitleColor2     =   0
         TitleGradient   =   0
         TitleHeight     =   200
         BorderColor     =   192
         Begin VB.OptionButton OpSemua 
            BackColor       =   &H00000000&
            Caption         =   "Semua"
            ForeColor       =   &H000000FF&
            Height          =   255
            Left            =   120
            Style           =   1  'Graphical
            TabIndex        =   22
            Top             =   120
            Value           =   -1  'True
            Width           =   1455
         End
      End
      Begin VB.Label lblaktif 
         Alignment       =   2  'Center
         Appearance      =   0  'Flat
         BackColor       =   &H00004000&
         BorderStyle     =   1  'Fixed Single
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000C000&
         Height          =   255
         Left            =   7850
         TabIndex        =   54
         Top             =   5880
         Width           =   3315
      End
      Begin VB.Label Label28 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Lihat status pembayaran sebelumnya"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000C000&
         Height          =   195
         Left            =   120
         TabIndex        =   29
         Top             =   5880
         Width           =   3135
      End
   End
   Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame1 
      Height          =   1215
      Left            =   45
      TabIndex        =   39
      Top             =   45
      Width           =   5055
      _ExtentX        =   8916
      _ExtentY        =   2143
      BackColor1      =   0
      BackColor2      =   0
      BackGradient    =   0
      Caption         =   ""
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   255
      TitleColor1     =   2565927
      TitleColor2     =   2565927
      TitleGradient   =   0
      TitleHeight     =   350
      BorderColor     =   49152
      BorderWidth     =   2
      Begin VB.Image ImgLogo 
         Height          =   1050
         Left            =   75
         Picture         =   "FrmMain.frx":1E64B
         Stretch         =   -1  'True
         Top             =   75
         Width           =   4890
      End
   End
   Begin BLacKPeaRLOCX.BLacKText usnm 
      Height          =   375
      Left            =   480
      TabIndex        =   40
      Top             =   720
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   661
      BackColor       =   4210752
      BackColorMain   =   16777215
      DownButton      =   0   'False
      BorderColor     =   255
      FocusBackColor  =   0
      FocusForeColor  =   255
      FocusBackMainColor=   12632256
      FocusBorderColor=   12582912
      FontItalic      =   0   'False
      FontName        =   "Arial"
      FontSize        =   8.25
      ForeColor       =   0
      Text            =   ""
   End
   Begin BLacKPeaRLOCX.BLacKText lgas 
      Height          =   375
      Left            =   480
      TabIndex        =   41
      Top             =   720
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   661
      BackColor       =   4210752
      BackColorMain   =   16777215
      DownButton      =   0   'False
      BorderColor     =   255
      FocusBackColor  =   0
      FocusForeColor  =   255
      FocusBackMainColor=   12632256
      FocusBorderColor=   12582912
      FontItalic      =   0   'False
      FontName        =   "Arial"
      FontSize        =   8.25
      ForeColor       =   0
      Text            =   ""
   End
   Begin BLacKPeaRLOCX.BLacKText nm 
      Height          =   375
      Left            =   480
      TabIndex        =   42
      Top             =   720
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   661
      BackColor       =   4210752
      BackColorMain   =   16777215
      DownButton      =   0   'False
      BorderColor     =   255
      FocusBackColor  =   0
      FocusForeColor  =   255
      FocusBackMainColor=   12632256
      FocusBorderColor=   12582912
      FontItalic      =   0   'False
      FontName        =   "Arial"
      FontSize        =   8.25
      ForeColor       =   0
      Text            =   ""
   End
   Begin BLacKPeaRLOCX.BLacKFrame BLacKFrame4 
      Height          =   855
      Left            =   50
      TabIndex        =   44
      Top             =   9840
      Width           =   15135
      _ExtentX        =   26696
      _ExtentY        =   1508
      BackColor1      =   0
      BackColor2      =   4210752
      Caption         =   ""
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   255
      TitleColor1     =   4210752
      TitleColor2     =   0
      TitleGradient   =   2
      TitleHeight     =   200
      BorderColor     =   49152
      BorderWidth     =   2
      Begin BLacKPeaRLOCX.ButtonNix Cmdjual 
         Height          =   495
         Left            =   1200
         TabIndex        =   52
         ToolTipText     =   "Penjualan bukan jasa."
         Top             =   200
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   873
         BTYPE           =   5
         TX              =   ""
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":22BF5
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdlaporanpenjualan 
         Height          =   495
         Left            =   2775
         TabIndex        =   51
         ToolTipText     =   "Laporan penjualan bukan jasa"
         Top             =   200
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   873
         BTYPE           =   5
         TX              =   ""
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":22C11
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdlaporanbilling 
         Height          =   495
         Left            =   4350
         TabIndex        =   50
         ToolTipText     =   "Laporan pendapatan jasa anda"
         Top             =   200
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   873
         BTYPE           =   5
         TX              =   ""
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":22C2D
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdpendaftaranuser 
         Height          =   495
         Left            =   5925
         TabIndex        =   49
         ToolTipText     =   "Daftar Operator anda disini"
         Top             =   200
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   873
         BTYPE           =   5
         TX              =   ""
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":22C49
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdSpaceImpact 
         Height          =   495
         Left            =   7500
         TabIndex        =   48
         ToolTipText     =   "Suntuk, main game yuuk."
         Top             =   200
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   873
         BTYPE           =   5
         TX              =   ""
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":22C65
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdMp3 
         Height          =   495
         Left            =   9075
         TabIndex        =   47
         ToolTipText     =   "Suntuk lagi, dengerin musik aja"
         Top             =   200
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   873
         BTYPE           =   5
         TX              =   ""
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":22C81
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdstyle 
         Height          =   495
         Left            =   10650
         TabIndex        =   46
         ToolTipText     =   "Tuker tampilan billing."
         Top             =   200
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   873
         BTYPE           =   5
         TX              =   ""
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":22C9D
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdExit 
         Height          =   495
         Left            =   12225
         TabIndex        =   45
         ToolTipText     =   ":(( Mo Keluar ya???"
         Top             =   200
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   873
         BTYPE           =   5
         TX              =   ""
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmMain.frx":22CB9
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
   End
   Begin HookMenu.ctxHookMenu ctxHookMenu1 
      Left            =   0
      Top             =   0
      _ExtentX        =   900
      _ExtentY        =   900
      BmpCount        =   57
      Bmp:1           =   "FrmMain.frx":22CD5
      Key:1           =   "#mnustop"
      Bmp:2           =   "FrmMain.frx":230FD
      Mask:2          =   11119017
      Key:2           =   "#mnuclient"
      Bmp:3           =   "FrmMain.frx":23525
      Key:3           =   "#mnupindah"
      Bmp:4           =   "FrmMain.frx":2394D
      Key:4           =   "#mnushutdown"
      Bmp:5           =   "FrmMain.frx":23D75
      Key:5           =   "#mnuunlock"
      Bmp:6           =   "FrmMain.frx":2419D
      Key:6           =   "#mnuactiv"
      Bmp:7           =   "FrmMain.frx":245C5
      Key:7           =   "#mnupassadmin"
      Bmp:8           =   "FrmMain.frx":249ED
      Mask:8          =   263172
      Key:8           =   "#mnurefr"
      Bmp:9           =   "FrmMain.frx":24E15
      Key:9           =   "#mnupesan"
      Bmp:10          =   "FrmMain.frx":2523D
      Mask:10         =   12236727
      Key:10          =   "#mnubackup"
      Bmp:11          =   "FrmMain.frx":25665
      Mask:11         =   11119017
      Key:11          =   "#mnumember"
      Bmp:12          =   "FrmMain.frx":25A8D
      Key:12          =   "#mnumati"
      Bmp:13          =   "FrmMain.frx":25EB5
      Mask:13         =   16777215
      Key:13          =   "#mnusetting"
      Bmp:14          =   "FrmMain.frx":262DD
      Key:14          =   "#mnuconfig"
      Bmp:15          =   "FrmMain.frx":26705
      Key:15          =   "#mnuuser"
      Bmp:16          =   "FrmMain.frx":26B2D
      Key:16          =   "#mnures"
      Bmp:17          =   "FrmMain.frx":26F55
      Key:17          =   "#mnulaporan"
      Bmp:18          =   "FrmMain.frx":2737D
      Key:18          =   "#mnurekap"
      Bmp:19          =   "FrmMain.frx":277A5
      Key:19          =   "#rnt"
      Bmp:20          =   "FrmMain.frx":27BCD
      Key:20          =   "#mnudeposit"
      Bmp:21          =   "FrmMain.frx":27FF5
      Key:21          =   "#mnuhelp"
      Bmp:22          =   "FrmMain.frx":28D5D
      Key:22          =   "#help"
      Bmp:23          =   "FrmMain.frx":29185
      Key:23          =   "#mnuabout"
      Bmp:24          =   "FrmMain.frx":295AD
      Key:24          =   "#asss"
      Bmp:25          =   "FrmMain.frx":299D5
      Mask:25         =   6575188
      Key:25          =   "#as"
      Bmp:26          =   "FrmMain.frx":29DFD
      Key:26          =   "#rad"
      Bmp:27          =   "FrmMain.frx":2BB65
      Key:27          =   "#klkpesan"
      Bmp:28          =   "FrmMain.frx":2D8CD
      Key:28          =   "#klref"
      Bmp:29          =   "FrmMain.frx":2DCF5
      Key:29          =   "#Klkmenclin"
      Bmp:30          =   "FrmMain.frx":2EA5D
      Key:30          =   "#klkuti"
      Bmp:31          =   "FrmMain.frx":307C5
      Key:31          =   "#mnuchng"
      Mask:32         =   16711935
      Key:32          =   "#Relax"
      Bmp:33          =   "FrmMain.frx":3252D
      Key:33          =   "#Game"
      Bmp:34          =   "FrmMain.frx":34295
      Key:34          =   "#asds"
      Bmp:35          =   "FrmMain.frx":346BD
      Key:35          =   "#edit"
      Bmp:36          =   "FrmMain.frx":34AE5
      Key:36          =   "#mnutask1"
      Bmp:37          =   "FrmMain.frx":3684D
      Key:37          =   "#mnutask"
      Bmp:38          =   "FrmMain.frx":385B5
      Key:38          =   "#mnureg"
      Mask:39         =   16711935
      Key:39          =   "#sep"
      Bmp:40          =   "FrmMain.frx":3A31D
      Key:40          =   "#MnuBrowser"
      Bmp:41          =   "FrmMain.frx":3A745
      Mask:41         =   5255680
      Key:41          =   "#MnuDefense"
      Mask:42         =   16711935
      Key:42          =   "#mnuserver"
      Bmp:43          =   "FrmMain.frx":3AB6D
      Key:43          =   "#mnuactivbil"
      Bmp:44          =   "FrmMain.frx":3AF95
      Key:44          =   "#MnuPayFirst"
      Bmp:45          =   "FrmMain.frx":3B3BD
      Key:45          =   "#MnuTukarOP"
      Bmp:46          =   "FrmMain.frx":3B7E5
      Key:46          =   "#MnuStartLogF"
      Bmp:47          =   "FrmMain.frx":3BC0D
      Key:47          =   "#MnuStopLogF"
      Bmp:48          =   "FrmMain.frx":3C035
      Key:48          =   "#MnuChange"
      Bmp:49          =   "FrmMain.frx":3C45D
      Key:49          =   "#MnuOpen"
      Bmp:50          =   "FrmMain.frx":3C885
      Key:50          =   "#MnuClose"
      Bmp:51          =   "FrmMain.frx":3CCAD
      Key:51          =   "#MnuURL"
      Bmp:52          =   "FrmMain.frx":3D0D5
      Key:52          =   "#klkradmin"
      Bmp:53          =   "FrmMain.frx":3D4FD
      Key:53          =   "#mnuappblock"
      Bmp:54          =   "FrmMain.frx":3D925
      Key:54          =   "#MnuBarang"
      Bmp:55          =   "FrmMain.frx":3DD4D
      Key:55          =   "#mnupenj"
      Bmp:56          =   "FrmMain.frx":3E175
      Key:56          =   "#mnupemb"
      Bmp:57          =   "FrmMain.frx":3E59D
      Key:57          =   "#mnulappemb"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Times New Roman"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin MSComctlLib.ImageList ImageList 
      Left            =   2640
      Top             =   6840
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   9
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmMain.frx":3E9C5
            Key             =   "department"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmMain.frx":3F29F
            Key             =   "schoolyear"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmMain.frx":3FB79
            Key             =   "yearlevel"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmMain.frx":40453
            Key             =   "sectionoffering"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmMain.frx":40D2D
            Key             =   "section"
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmMain.frx":41607
            Key             =   "teacher"
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmMain.frx":41EE1
            Key             =   "student"
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmMain.frx":427BB
            Key             =   "enrolment"
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmMain.frx":43095
            Key             =   "subject"
         EndProperty
      EndProperty
   End
   Begin VB.Image Image20 
      Height          =   240
      Left            =   240
      Picture         =   "FrmMain.frx":43F6F
      Stretch         =   -1  'True
      Top             =   7560
      Width           =   240
   End
   Begin VB.Image Image19 
      Height          =   255
      Left            =   240
      Picture         =   "FrmMain.frx":44DB1
      Stretch         =   -1  'True
      Top             =   7080
      Width           =   255
   End
   Begin VB.Image Image18 
      Height          =   255
      Left            =   240
      Picture         =   "FrmMain.frx":45BF3
      Stretch         =   -1  'True
      Top             =   6600
      Width           =   255
   End
   Begin VB.Image Image17 
      Height          =   255
      Left            =   240
      Picture         =   "FrmMain.frx":46A35
      Stretch         =   -1  'True
      Top             =   5880
      Width           =   255
   End
   Begin VB.Image Image16 
      Height          =   255
      Left            =   240
      Picture         =   "FrmMain.frx":4872F
      Stretch         =   -1  'True
      Top             =   5400
      Width           =   255
   End
   Begin VB.Image Image15 
      Height          =   255
      Left            =   240
      Picture         =   "FrmMain.frx":4A429
      Stretch         =   -1  'True
      Top             =   4920
      Width           =   255
   End
   Begin VB.Image Image14 
      Height          =   255
      Left            =   240
      Picture         =   "FrmMain.frx":4B26B
      Stretch         =   -1  'True
      Top             =   4200
      Width           =   255
   End
   Begin VB.Image Image13 
      Height          =   255
      Left            =   240
      Picture         =   "FrmMain.frx":4BB35
      Stretch         =   -1  'True
      Top             =   3720
      Width           =   255
   End
   Begin VB.Image Image12 
      Height          =   255
      Left            =   240
      Picture         =   "FrmMain.frx":4C3FF
      Stretch         =   -1  'True
      Top             =   3240
      Width           =   255
   End
   Begin VB.Image Image11 
      Height          =   255
      Left            =   240
      Picture         =   "FrmMain.frx":4D241
      Stretch         =   -1  'True
      Top             =   2520
      Width           =   255
   End
   Begin VB.Image Image5 
      Height          =   255
      Left            =   240
      Picture         =   "FrmMain.frx":4E083
      Stretch         =   -1  'True
      Top             =   2040
      Width           =   255
   End
   Begin VB.Image Image4 
      Height          =   255
      Left            =   240
      Picture         =   "FrmMain.frx":4EEC5
      Stretch         =   -1  'True
      Top             =   1560
      Width           =   255
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "Unlock Billing"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   255
      Left            =   600
      MouseIcon       =   "FrmMain.frx":4FD07
      MousePointer    =   99  'Custom
      TabIndex        =   20
      ToolTipText     =   "Unlock billing untuk orang tertentu."
      Top             =   2520
      Width           =   1500
   End
   Begin VB.Label Label7 
      BackStyle       =   0  'Transparent
      Caption         =   "Help!"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   255
      Left            =   600
      MouseIcon       =   "FrmMain.frx":50011
      MousePointer    =   99  'Custom
      TabIndex        =   19
      ToolTipText     =   "Butuh bantuan atau pengen ngebantu?? klik disini."
      Top             =   7560
      Width           =   1500
   End
   Begin VB.Label Label18 
      BackStyle       =   0  'Transparent
      Caption         =   "Run"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   255
      Left            =   600
      MouseIcon       =   "FrmMain.frx":5031B
      MousePointer    =   99  'Custom
      TabIndex        =   18
      ToolTipText     =   "Fungsinya hampir sama kayak menu run windows"
      Top             =   6600
      Width           =   1500
   End
   Begin VB.Label Label17 
      BackStyle       =   0  'Transparent
      Caption         =   "About"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   255
      Left            =   600
      MouseIcon       =   "FrmMain.frx":50625
      MousePointer    =   99  'Custom
      TabIndex        =   17
      Top             =   7080
      Width           =   1500
   End
   Begin VB.Label Label16 
      BackStyle       =   0  'Transparent
      Caption         =   "Backup Data"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   255
      Left            =   600
      MouseIcon       =   "FrmMain.frx":5092F
      MousePointer    =   99  'Custom
      TabIndex        =   16
      ToolTipText     =   "backup databases billing"
      Top             =   5880
      Width           =   1500
   End
   Begin VB.Label Label14 
      BackStyle       =   0  'Transparent
      Caption         =   "Konfigurasi"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   255
      Left            =   600
      MouseIcon       =   "FrmMain.frx":50C39
      MousePointer    =   99  'Custom
      TabIndex        =   15
      ToolTipText     =   "Konfigurasi settingan billing disini"
      Top             =   4920
      Width           =   1500
   End
   Begin VB.Label Label13 
      BackStyle       =   0  'Transparent
      Caption         =   "Edit IP Client"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   255
      Left            =   600
      MouseIcon       =   "FrmMain.frx":50F43
      MousePointer    =   99  'Custom
      TabIndex        =   14
      ToolTipText     =   "Edit IP Client"
      Top             =   5400
      Width           =   1500
   End
   Begin VB.Label Label12 
      BackStyle       =   0  'Transparent
      Caption         =   "Sisa Saldo"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   255
      Left            =   600
      MouseIcon       =   "FrmMain.frx":5124D
      MousePointer    =   99  'Custom
      TabIndex        =   13
      ToolTipText     =   "Cek sisa saldo member"
      Top             =   4200
      Width           =   1500
   End
   Begin VB.Label Label10 
      BackStyle       =   0  'Transparent
      Caption         =   "Daftar Member"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   255
      Left            =   600
      MouseIcon       =   "FrmMain.frx":51557
      MousePointer    =   99  'Custom
      TabIndex        =   12
      ToolTipText     =   "Jika ada member yang pengen daftar, klik disini."
      Top             =   3240
      Width           =   1500
   End
   Begin VB.Label Label9 
      BackStyle       =   0  'Transparent
      Caption         =   "Tambah Saldo"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   255
      Left            =   600
      MouseIcon       =   "FrmMain.frx":51861
      MousePointer    =   99  'Custom
      TabIndex        =   11
      ToolTipText     =   "Member kurang saldo?? tambah disini"
      Top             =   3720
      Width           =   1500
   End
   Begin VB.Label Label8 
      BackStyle       =   0  'Transparent
      Caption         =   "Porn Blocker"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   255
      Left            =   600
      MouseIcon       =   "FrmMain.frx":51B6B
      MousePointer    =   99  'Custom
      TabIndex        =   10
      ToolTipText     =   "Block Situs porno dengan tool ini"
      Top             =   2040
      Width           =   1500
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "Desktop Client"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   255
      Left            =   600
      MouseIcon       =   "FrmMain.frx":51E75
      MousePointer    =   99  'Custom
      TabIndex        =   9
      ToolTipText     =   "Desktop Client, Untuk melihat layar dektop client"
      Top             =   1560
      Width           =   1500
   End
   Begin VB.Image imghov 
      Height          =   465
      Left            =   180
      Stretch         =   -1  'True
      Top             =   7440
      Visible         =   0   'False
      Width           =   1965
   End
   Begin VB.Image imghov2 
      Height          =   465
      Left            =   180
      Stretch         =   -1  'True
      Top             =   6960
      Visible         =   0   'False
      Width           =   1965
   End
   Begin VB.Image imghov3 
      Height          =   465
      Left            =   180
      Stretch         =   -1  'True
      Top             =   6480
      Visible         =   0   'False
      Width           =   1965
   End
   Begin VB.Image imghov4 
      Height          =   465
      Left            =   180
      Stretch         =   -1  'True
      Top             =   5760
      Visible         =   0   'False
      Width           =   1965
   End
   Begin VB.Image imghov5 
      Height          =   465
      Left            =   180
      Stretch         =   -1  'True
      ToolTipText     =   "Edit IP Client jika ada kesalahan di client"
      Top             =   5280
      Visible         =   0   'False
      Width           =   1965
   End
   Begin VB.Image imghov6 
      Height          =   465
      Left            =   180
      Stretch         =   -1  'True
      Top             =   4800
      Visible         =   0   'False
      Width           =   1965
   End
   Begin VB.Image imghov7 
      Height          =   465
      Left            =   180
      Stretch         =   -1  'True
      Top             =   4080
      Visible         =   0   'False
      Width           =   1965
   End
   Begin VB.Image imghov8 
      Height          =   465
      Left            =   180
      Stretch         =   -1  'True
      Top             =   3600
      Visible         =   0   'False
      Width           =   1965
   End
   Begin VB.Image imghov9 
      Height          =   465
      Left            =   180
      Stretch         =   -1  'True
      Top             =   3120
      Visible         =   0   'False
      Width           =   1965
   End
   Begin VB.Image imghov10 
      Height          =   465
      Left            =   180
      Stretch         =   -1  'True
      Top             =   2400
      Visible         =   0   'False
      Width           =   1965
   End
   Begin VB.Image imghov11 
      Height          =   465
      Left            =   180
      Stretch         =   -1  'True
      Top             =   1920
      Visible         =   0   'False
      Width           =   1965
   End
   Begin VB.Label locks 
      BackColor       =   &H8000000D&
      BackStyle       =   0  'Transparent
      Height          =   315
      Left            =   960
      TabIndex        =   8
      Top             =   9240
      Width           =   765
   End
   Begin VB.Label menus 
      BackColor       =   &H00FFFF80&
      BackStyle       =   0  'Transparent
      Height          =   315
      Left            =   1800
      TabIndex        =   7
      Top             =   9240
      Width           =   300
   End
   Begin VB.Label shut 
      BackColor       =   &H00004040&
      BackStyle       =   0  'Transparent
      Height          =   315
      Left            =   180
      TabIndex        =   6
      Top             =   9240
      Width           =   810
   End
   Begin VB.Image normal 
      Height          =   360
      Left            =   180
      Picture         =   "FrmMain.frx":5217F
      Stretch         =   -1  'True
      Top             =   9240
      Width           =   1935
   End
   Begin VB.Image lock2 
      Height          =   360
      Left            =   180
      Picture         =   "FrmMain.frx":52FAC
      Stretch         =   -1  'True
      Top             =   9240
      Visible         =   0   'False
      Width           =   1935
   End
   Begin VB.Image shut2 
      Height          =   360
      Left            =   180
      Picture         =   "FrmMain.frx":53DAB
      Stretch         =   -1  'True
      Top             =   9240
      Visible         =   0   'False
      Width           =   1935
   End
   Begin VB.Image shut1 
      Height          =   360
      Left            =   180
      Picture         =   "FrmMain.frx":54BA1
      Stretch         =   -1  'True
      Top             =   9240
      Visible         =   0   'False
      Width           =   1935
   End
   Begin VB.Image lock1 
      Height          =   360
      Left            =   180
      Picture         =   "FrmMain.frx":55997
      Stretch         =   -1  'True
      Top             =   9240
      Visible         =   0   'False
      Width           =   1935
   End
   Begin VB.Image menu 
      Height          =   360
      Left            =   180
      Picture         =   "FrmMain.frx":5675D
      Stretch         =   -1  'True
      Top             =   9240
      Visible         =   0   'False
      Width           =   1935
   End
   Begin VB.Image Image10 
      Height          =   30
      Left            =   180
      Picture         =   "FrmMain.frx":57535
      Stretch         =   -1  'True
      Top             =   6360
      Width           =   1920
   End
   Begin VB.Image Image9 
      Height          =   30
      Left            =   180
      Picture         =   "FrmMain.frx":576C2
      Stretch         =   -1  'True
      Top             =   8040
      Width           =   1920
   End
   Begin VB.Image Image6 
      Height          =   30
      Left            =   180
      Picture         =   "FrmMain.frx":5784F
      Stretch         =   -1  'True
      Top             =   3000
      Width           =   1920
   End
   Begin VB.Image Image8 
      Height          =   30
      Left            =   180
      Picture         =   "FrmMain.frx":579DC
      Stretch         =   -1  'True
      Top             =   4680
      Width           =   1920
   End
   Begin VB.Image imghov12 
      Height          =   465
      Left            =   180
      Stretch         =   -1  'True
      Top             =   1440
      Visible         =   0   'False
      Width           =   1965
   End
   Begin VB.Image Image3 
      Height          =   8415
      Left            =   45
      Stretch         =   -1  'True
      Top             =   1305
      Width           =   2205
   End
   Begin VB.Menu mnuserve 
      Caption         =   "&File"
      Begin VB.Menu mnuclient 
         Caption         =   "&Menu Client"
         Begin VB.Menu mnustop 
            Caption         =   "Hentikan Client"
            Shortcut        =   ^S
         End
         Begin VB.Menu mnupindah 
            Caption         =   "Pindah Client"
            Shortcut        =   ^P
         End
         Begin VB.Menu mnushutdown 
            Caption         =   "Shutdown Client"
            Shortcut        =   ^D
         End
         Begin VB.Menu sep 
            Caption         =   "-"
         End
         Begin VB.Menu mnuactiv 
            Caption         =   "Kunci Billing"
            Shortcut        =   ^L
         End
         Begin VB.Menu mnuunlock 
            Caption         =   "Buka Kunic Billing"
            Shortcut        =   ^U
         End
         Begin VB.Menu sasad 
            Caption         =   "-"
         End
         Begin VB.Menu MnuOpen 
            Caption         =   "Buka Client"
         End
         Begin VB.Menu MnuClose 
            Caption         =   "Tutup Client"
         End
         Begin VB.Menu fd 
            Caption         =   "-"
         End
         Begin VB.Menu MnuStartLogF 
            Caption         =   "Mulai Log"
            Shortcut        =   {F6}
         End
         Begin VB.Menu MnuStopLogF 
            Caption         =   "Berhenti Log"
            Shortcut        =   {F7}
         End
         Begin VB.Menu aasdddd 
            Caption         =   "-"
         End
         Begin VB.Menu as 
            Caption         =   "Aktifkan Porn Blocker"
            Shortcut        =   ^A
         End
         Begin VB.Menu asss 
            Caption         =   "Non Aktifkan Porn Blocker"
            Shortcut        =   ^B
         End
         Begin VB.Menu sep2 
            Caption         =   "-"
         End
         Begin VB.Menu mnutask1 
            Caption         =   "Client Task Manager"
            Shortcut        =   +{DEL}
         End
         Begin VB.Menu rad 
            Caption         =   "Desktop Client"
            Shortcut        =   %{BKSP}
         End
      End
      Begin VB.Menu sep9 
         Caption         =   "-"
      End
      Begin VB.Menu mnuutil 
         Caption         =   "&Utility"
         Begin VB.Menu mnupesan 
            Caption         =   "Pesan"
            Shortcut        =   ^M
         End
         Begin VB.Menu MnuList 
            Caption         =   "List Koneksi"
         End
         Begin VB.Menu mnuchatserv 
            Caption         =   "Chat Server"
         End
         Begin VB.Menu sep33 
            Caption         =   "-"
         End
         Begin VB.Menu mnubackup 
            Caption         =   "Backup Database"
            Shortcut        =   ^C
         End
         Begin VB.Menu sep13 
            Caption         =   "-"
         End
         Begin VB.Menu mnumember 
            Caption         =   "Pendaftaran Member"
            Shortcut        =   ^V
         End
         Begin VB.Menu MnuPayFirst 
            Caption         =   "Pendaftaran PayFirst"
         End
         Begin VB.Menu asds 
            Caption         =   "Tambah Deposit"
            Shortcut        =   ^T
         End
         Begin VB.Menu asd 
            Caption         =   "-"
         End
         Begin VB.Menu MnuDefense 
            Caption         =   "Registry Defender"
            Shortcut        =   ^{F2}
         End
         Begin VB.Menu MnuFix 
            Caption         =   "Fix Files"
         End
      End
      Begin VB.Menu poi 
         Caption         =   "-"
      End
      Begin VB.Menu Mnuchange 
         Caption         =   "Tukar Operator"
      End
      Begin VB.Menu bgf 
         Caption         =   "-"
      End
      Begin VB.Menu MnuLock 
         Caption         =   "Kunci Server"
      End
      Begin VB.Menu asde 
         Caption         =   "-"
      End
      Begin VB.Menu mnumati 
         Caption         =   "Keluar"
      End
   End
   Begin VB.Menu mnusettin 
      Caption         =   "&Setting"
      Begin VB.Menu mnuconfig 
         Caption         =   "Konfigurasi"
         Shortcut        =   ^K
      End
      Begin VB.Menu mnuconfdat 
         Caption         =   "Konfigurasi Databases"
      End
      Begin VB.Menu sep4 
         Caption         =   "-"
      End
      Begin VB.Menu mnupassadmin 
         Caption         =   "Set Password Client"
      End
      Begin VB.Menu sd 
         Caption         =   "-"
      End
      Begin VB.Menu mnuuser 
         Caption         =   "Daftar Operator"
      End
      Begin VB.Menu sep5 
         Caption         =   "-"
      End
      Begin VB.Menu mnures 
         Caption         =   "Segarkan"
         Shortcut        =   {F5}
      End
      Begin VB.Menu ssasd 
         Caption         =   "-"
      End
      Begin VB.Menu addcapblock 
         Caption         =   "Add Url && Caption Block"
      End
      Begin VB.Menu edit 
         Caption         =   "Edit Client IP"
         Shortcut        =   ^X
      End
      Begin VB.Menu ss 
         Caption         =   "-"
      End
      Begin VB.Menu mnuchng 
         Caption         =   "Style"
         Begin VB.Menu Mnuchanges 
            Caption         =   "Change Style"
         End
         Begin VB.Menu MnuEdit 
            Caption         =   "Style Editor"
         End
      End
   End
   Begin VB.Menu MnuBarangs 
      Caption         =   "B&arang"
      Begin VB.Menu MnuBarang 
         Caption         =   "Input Data"
         Shortcut        =   {F3}
      End
      Begin VB.Menu MnuPenj 
         Caption         =   "Pen&jualan"
         Shortcut        =   +{F1}
      End
      Begin VB.Menu mnupemb 
         Caption         =   "Pembelian"
         Shortcut        =   +{F2}
      End
   End
   Begin VB.Menu mnulapora 
      Caption         =   "&Laporan"
      Begin VB.Menu mnurekap 
         Caption         =   "Laporan Billing"
         Shortcut        =   ^{INSERT}
      End
      Begin VB.Menu sep6 
         Caption         =   "-"
      End
      Begin VB.Menu rnt 
         Caption         =   "Laporan Penjualan"
         Shortcut        =   +{INSERT}
      End
      Begin VB.Menu mnulappemb 
         Caption         =   "Laporan Pembelian"
      End
      Begin VB.Menu sep7 
         Caption         =   "-"
      End
      Begin VB.Menu mnudeposit 
         Caption         =   "Sisa Saldo"
         Shortcut        =   {DEL}
      End
   End
   Begin VB.Menu Relax 
      Caption         =   "&Relax"
      Begin VB.Menu Game 
         Caption         =   "BLacK Impact"
      End
   End
   Begin VB.Menu mnuhelpp 
      Caption         =   "&Help"
      Begin VB.Menu help 
         Caption         =   "Help ???"
         Shortcut        =   {F1}
      End
      Begin VB.Menu sep21 
         Caption         =   "-"
      End
      Begin VB.Menu mnureg 
         Caption         =   "Register"
      End
      Begin VB.Menu sas 
         Caption         =   "-"
      End
      Begin VB.Menu mnuabout 
         Caption         =   "About !!!"
         Shortcut        =   {F2}
      End
      Begin VB.Menu mnuklik 
         Caption         =   "Klik"
         Visible         =   0   'False
         Begin VB.Menu Klkmenclin 
            Caption         =   "&Menu Client"
            Begin VB.Menu klkstop 
               Caption         =   "Stop Client"
            End
            Begin VB.Menu klkPindah 
               Caption         =   "Pindah Client"
            End
            Begin VB.Menu klkshut 
               Caption         =   "Shutdown Client"
            End
         End
         Begin VB.Menu klkuti 
            Caption         =   "&Utility"
            Begin VB.Menu Activeporn 
               Caption         =   "Aktifkan Porn Blocker"
            End
            Begin VB.Menu deactive 
               Caption         =   "Non Aktifkan Porn Blocker"
            End
            Begin VB.Menu mnuappblock 
               Caption         =   "App Blocker"
            End
            Begin VB.Menu gfh 
               Caption         =   "-"
            End
            Begin VB.Menu klklock 
               Caption         =   "Kunci Billing"
            End
            Begin VB.Menu klkunlock 
               Caption         =   "Buka Kunci Billing"
            End
            Begin VB.Menu tyu 
               Caption         =   "-"
            End
            Begin VB.Menu MnuStartLog 
               Caption         =   "Mulai Log"
            End
            Begin VB.Menu MnuStopLog 
               Caption         =   "Berhenti Log"
            End
            Begin VB.Menu hj 
               Caption         =   "-"
            End
            Begin VB.Menu mnuactivbil 
               Caption         =   "Buka Client"
            End
            Begin VB.Menu Mnudeac 
               Caption         =   "Tutup Client"
            End
            Begin VB.Menu erww 
               Caption         =   "-"
            End
            Begin VB.Menu mnutask 
               Caption         =   "Client Task Manager"
            End
            Begin VB.Menu MnuURL 
               Caption         =   "Monitoring URL"
            End
            Begin VB.Menu klkradmin 
               Caption         =   "Desktop Client"
            End
         End
         Begin VB.Menu dt 
            Caption         =   "-"
         End
         Begin VB.Menu klref 
            Caption         =   "Refresh"
         End
         Begin VB.Menu dtdes 
            Caption         =   "-"
         End
         Begin VB.Menu MnuPenjualans 
            Caption         =   "Pen&jualan"
         End
         Begin VB.Menu MnuViewBel 
            Caption         =   "Lihat Belanja"
         End
         Begin VB.Menu klkpesan 
            Caption         =   "&Pesan"
         End
      End
   End
End
Attribute VB_Name = "FrmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub MenuAdmin()
    mnuconfig.Enabled = True
    mnuuser.Enabled = True
    
    mnubackup.Enabled = True
    mnumember.Enabled = True
    mnuconfdat.Visible = False
End Sub
Private Sub MenuUser()
mnuactiv.Enabled = False
mnuunlock.Enabled = False
mnubackup.Enabled = False
mnumember.Enabled = False
MnuPayFirst.Enabled = False
asds.Enabled = False
mnupassadmin.Enabled = False
mnuconfig.Enabled = False
mnulapora.Enabled = False
Label6.Enabled = False
Label10.Enabled = False
Label9.Enabled = False
Label12.Enabled = False
Label14.Enabled = False
Label16.Enabled = False
cmdlaporanbilling.Enabled = False
cmdlaporanpenjualan.Enabled = False
klkunlock.Enabled = False
klklock.Enabled = False
TreeOP.Enabled = False
mnuconfdat.Visible = False
CmdHapus.Enabled = False
End Sub
Private Sub MenuRoot()
mnureg.Visible = False
sas.Visible = False
End Sub

Private Sub Activeporn_Click()
Call as_Click
End Sub

Private Sub addcapblock_Click()
Load FrmAddCap
FrmAddCap.Show
End Sub

Private Sub as_Click()
Load FrmActivePorn
FrmActivePorn.txtnoclient.Text = clientpopup
FrmActivePorn.BLacKFrame1.Caption = "Activate Porn Blocker"
FrmActivePorn.cmdActive.Caption = "Aktifkan"
FrmActivePorn.Show 1
End Sub

Private Sub asds_Click()
 Load FrmTambahSaldo
    FrmTambahSaldo.Show 1
End Sub
Private Sub asss_Click()
Load FrmActivePorn
FrmActivePorn.txtnoclient.Text = clientpopup
FrmActivePorn.BLacKFrame1.Caption = "Deactivate Porn Blocker"
FrmActivePorn.cmdActive.Caption = "Batalkan"
FrmActivePorn.Show 1
End Sub
Private Sub ButtonNix3_Click()
Exp.Visible = False
End Sub

Private Sub cdclosest_Click()
frmstyle.Visible = False
End Sub

Private Sub CmdAddPenjs_Click()
If GridStatusBayar.TextMatrix(GridStatusBayar.Row, 10) = "No" Then

Load FrmPenjualan
FrmPenjualan.txtws.Text = txtws.Text
FrmPenjualan.txtnoclient.Text = GridStatusBayar.TextMatrix(GridStatusBayar.Row, 3)
FrmPenjualan.framepenj.Caption = "Tambah Penjualan"
CmdTutup_Click
FrmPenjualan.Show 1
Else
Load FrmPenjualan
FrmPenjualan.txtnota.Text = txtnota.Text
FrmPenjualan.txtws.Text = txtws.Text
FrmPenjualan.txtnoclient.Text = GridStatusBayar.TextMatrix(GridStatusBayar.Row, 3)
FrmPenjualan.framepenj.Caption = "Tambah Penjualan"
CmdTutup_Click
FrmPenjualan.Show 1
End If
End Sub

Private Sub CmdBayar_Click()
If txtnota.Text = "" Or txtws.Text = "" Then
Exit Sub
Else
rec.Open "laporan", conn, adOpenStatic, adLockOptimistic
rec.AddNew
rec(0) = txtnota.Text
rec(1) = Format(Now, "DD-MM-YYYY")
rec(2) = txtws.Text
rec(3) = txtnamacli.Text
rec(4) = txtstart.Text
rec(5) = txtsel.Text
rec(6) = txtdur.Text
rec(7) = txttot.Text
rec(8) = Format(Now, "MM")
rec(9) = Format(Now, "YYYY")
rec(10) = txtjen.Text
If lvbar.ListItems.Count = 0 Then
rec(11) = "No"
Else
rec(11) = "Yes"
End If
rec(12) = usnm.Text
rec(13) = "Ok"
rec.Update
rec.Close

If GridStatusBayar.TextMatrix(GridStatusBayar.Row, 10) = "No" Then
rec.Open "select status.* from status where status.no_nota='" & txtnota.Text & "'", conn, adOpenStatic, adLockOptimistic
rec.Delete
rec.Close

ElseIf lvbar.ListItems.Count = 0 Then
rec.Open "select status.* from status where status.bel='" & txtnota.Text & "'", conn, adOpenStatic, adLockOptimistic
rec.Delete
rec.Close

Else
rec.Open "select penjualan.* from penjualan where penjualan.Nota= '" & txtnota.Text & "'and penjualan.jenis='" & "Jasa" & "' and penjualan.stat='" & "Pending" & "' and penjualan.cls='" & "No" & "'", conn, adOpenStatic, adLockOptimistic
rec.MoveFirst
While Not rec.EOF
rec(8) = "Approve"
rec(9) = "Yes"
rec.MoveNext
Wend
rec.Close

rec.Open "select status.* from status where status.bel='" & txtnota.Text & "'", conn, adOpenStatic, adLockOptimistic
rec.Delete
rec.Close

End If
CekRekap
txtnota.Text = ""
txtws.Text = ""
txtnamacli.Text = ""
txtstart.Text = ""
txtsel.Text = ""
txtdur.Text = ""
txttot.Text = ""
txtjen.Text = ""
lvbar.ListItems.Clear
FrameBayar.Visible = False
MsgBox "Pembayaran Berhasil.", vbInformation, "Success"
End If
End Sub

Private Sub cmdHideview_Click()
If cmdHideview.Caption = "Hide" Then
MSFlexGrid.Height = BLacKFrame2.Height - cmdHideview.Height - cmdHideview.Height + 50
cmdHideview.Caption = "View"
ElseIf cmdHideview.Caption = "View" Then
MSFlexGrid.Height = Exp.Height / 3 * 2
cmdHideview.Caption = "Hide"
End If
End Sub

Private Sub cmdlaporanpenjualan_Click()
Load FrmJual
FrmJual.framelap.Caption = "Laporan Penjualan"
FrmJual.Show 1
End Sub

Private Sub cmdLstct_Click()
Load FrmStatus
FrmStatus.Show 1

End Sub

Private Sub CmdPrint_Click()
If lvbar.ListItems.Count = 0 Then
notaNo
Else
notaYes
End If
End Sub
Private Sub notaYes()
Dim lokasidata As String
Dim user As String
Dim namadata As String
Dim pass As String
Dim port As String
Dim datver As String
datver = FrmDatabases.txtdatabases.Text
lokasidata = FrmDatabases.txtlokda.Text
user = FrmDatabases.TxtUser.Text
namadata = FrmDatabases.txtnameda.Text
pass = FrmDatabases.txtpass.Text
port = FrmDatabases.txtport

RptFaktur.adod.CursorLocation = ddADOUseClient
RptFaktur.adod.ConnectionString = "Driver=" & datver & ";SERVER=" & lokasidata & ";PORT=" & port & ";DATABASE=" & namadata & ";USER=" & user & ";PASSWORD=" & pass & ";OPTION=3;"
 
RptFaktur.adod.Source = "Select * from penjualan where penjualan.nota='" & txtnota.Text & "' and penjualan.stat='" & "Pending" & "' and penjualan.cls='" & "No" & "'"
With lvbar
For i = 1 To .ListItems.Count
 icount = Val(.ListItems(i).SubItems(4))
 itotal = itotal + icount
 Next i
 End With

With RptFaktur

.lblsel.Caption = "Total bayar keseluruhan adalah : " & Format(itotal + Val(txttot.Text), "#,###,###")
.lblwilayah.Caption = Format(Now, "DD MMMM YYYY")
.fldjenis.Text = txtjen.Text
.flddurasi.Text = txtdur.Text
.fldmulai.Text = txtstart.Text
.fldselesai.Text = txtsel.Text
.fldtotal = Format(txttot.Text, "#,###,###")
.lblnama2.Caption = txtnamacli.Text
.LblNama.Caption = usnm.Text
.fldws.Text = txtws.Text
.lblNamaToko.Caption = FrmMain.Txtnama_warnet.Caption
.LblAlamat.Caption = FrmMain.Txtalamat1.Caption
.lblket.Caption = FrmMain.Txtalamat2.Caption
.Visible = True
End With

End Sub
Private Sub notaNo()
'On Error GoTo hell
    Printer.PrintQuality = 300
    Printer.FontSize = 10
    Printer.ScaleLeft = 10
    Printer.ScaleTop = 10
    Printer.Print Tab(10); "Nota Pembayaran Client"
    Printer.Print Tab(10); setTanggal; Tab(30); ":"; Tab(35); Format(Now, "DD-MM-YYYY")
    Printer.Print Tab(10); setNo & setNota; Tab(30); ":"; Tab(35); txtnota.Text
    Printer.Print Tab(10); "-------------------------------"
    Printer.Print Tab(10); Txtnama_warnet
    Printer.Print Tab(10); Txtalamat1
    Printer.Print Tab(10); Txtalamat2
    Printer.Print Tab(10); "-------------------------------"
    Printer.Print Tab(10); setClient; Tab(30); ":"; Tab(35); txtws.Text
    Printer.Print Tab(10); setNamaUser; Tab(30); ":"; Tab(35); txtnamacli.Text
    Printer.Print Tab(10); setJenis; Tab(30); ":"; Tab(35); txtjen.Text
    Printer.Print Tab(10); setMulai; Tab(30); ":"; Tab(35); txtstart.Text
    Printer.Print Tab(10); setSelesai; Tab(30); ":"; Tab(35); txtsel.Text
    Printer.Print Tab(10); setDurasi; Tab(30); ":"; Tab(35); txtdur.Text
    Printer.Print Tab(10); "Total jasa"; Tab(30); ":"; Tab(35); mata_uang & txttot.Text
    Printer.Print Tab(10); "-------------------------------"
    Printer.Print Tab(10); "Diterima Oleh : " & FrmMain.nm.Text
    Printer.Print Tab(10); setGreeting
    Printer.EndDoc
'IfNoErr:
'Exit Sub
'hell:
' 'MsgBox "An Error In " & Me.Name & ". See Error.log for detail", vbCritical, "Error Handling"
' TulisError Err.Description, Err.Number, "CmdPrint_Click", Me.Name
' Resume IfNoErr

End Sub
Private Sub cmdStatus_Click()
With FrmPopup
On Error Resume Next
.lbl.Caption = "Status Login"
.lbl1.Caption = "You are login as: " & lgas.Text & vbCrLf & vbCrLf & "Username: " & usnm.Text
.txthid.Text = 5
.Visible = True
End With
End Sub

Private Sub CmdTanggal_Click()
frametanggal.Visible = True
End Sub
Private Sub cmdchange_Click()
Dim bhs As New ClSINI
bhs.FileName = App.path & "\Styles\Used.ini"
bhs.ApplicationKey = "Style Now"
bhs.SetValue "Nama Style", cbostyle.Text
Unload FrmStyles
If cbostyle.Text = "Default" Then
MsgBox "Untuk menggunakan style default, restart billing anda.", vbInformation, "Change Style"
End If
Load FrmStyles
FrmStyles.Visible = False
FrmStyles.txtnamastyle.Text = cbostyle.Text
Call StyleS

End Sub

Private Sub cmdExit_Click()
Unload Me

End Sub

Private Sub cmdjam_Click()
framejam.Visible = True
End Sub

Private Sub Cmdjual_Click()
MnuPenj_Click
End Sub

Private Sub cmdlaporanbilling_Click()
    Load FrmLaporanBilling
    FrmLaporanBilling.Show 1
End Sub


Private Sub cmdMp3_Click()
FrmMp3.Visible = True

End Sub

Private Sub cmdpendaftaranuser_Click()
    Load FrmPendaftaranUser
    FrmPendaftaranUser.Show 1

End Sub
Private Sub cmdSpaceImpact_Click()
Load FrmSpaceImpact
FrmSpaceImpact.Show
End Sub

Private Sub cmdStatus_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
cmdStatus.ToolTipText = "Lihat status login"
End Sub

Private Sub cmdstyle_Click()
frmstyle.Visible = True
End Sub

Private Sub CmdTutup_Click()
FrameBayar.Visible = False
lvbar.ListItems.Clear
End Sub

Private Sub deactive_Click()
Call asss_Click
End Sub

Private Sub edit_Click()
Load FrmEditIpClient
FrmEditIpClient.Show 1
End Sub
Private Sub Form_Activate()
On Error Resume Next
    Foto.Picture = LoadPicture(txtpath.Text)
End Sub
Private Sub Form_Load()

Dim bhs As New ClSINI
bhs.FileName = App.path & "\Styles\Used.ini"
bhs.ApplicationKey = "Style Now"
cbostyle.Text = bhs.GetValue("Nama Style", "")

Load FrmStyles
FrmStyles.Visible = False

Me.WindowState = 2
ResizeForm Me
    Call CekSetingHarga
    Call CekTemp
    Call HapusdbSocket
    Call StyleS
    Call tanggal
    Call CekLogin
    Call AturGrid
    Call CekSetingDiscount
    Call CekPasswordAdmin
    Call CekRekap
    Call bahasa
    Call fotome
    Call loadpicmen
    Call checkoptime
    Call CekSetingUmum
    Call CekPortSet
    Call updateon
    cbostyle.AddItem "Default"
    cbostyle.AddItem "Greeny"
    cbostyle.AddItem "GirlStyle"
    cbostyle.AddItem "Dark"
    cbostyle.AddItem "Plastik"
    cbostyle.AddItem "BlueStyle"
    
On Error Resume Next
Set optre = TreeOP.Nodes.Add(, , "GenSet", "General", 1)
Set optre = TreeOP.Nodes.Add("GenSet", tvwChild, "Main", "Main Menu", 2)
Set optre = TreeOP.Nodes.Add("GenSet", tvwChild, "Konfig", "Konfigurasi", 2)
Set optre = TreeOP.Nodes.Add("GenSet", tvwChild, "DaftarUser", "Daftar User", 2)
Set optre = TreeOP.Nodes.Add("GenSet", tvwChild, "BackUp", "BackUp Data", 2)
Set optre = TreeOP.Nodes.Add("GenSet", tvwChild, "Penjualan", "Penjualan", 2)
Set optre = TreeOP.Nodes.Add(, , "CliTol", "Client Tools", 1)
Set optre = TreeOP.Nodes.Add("CliTol", tvwChild, "CliTolMem", "Member", 1)
Set optre = TreeOP.Nodes.Add("CliTolMem", tvwChild, "DaftarMember", "Daftar Member", 2)
Set optre = TreeOP.Nodes.Add("CliTolMem", tvwChild, "Tamsal", "Tambah Saldo", 2)
Set optre = TreeOP.Nodes.Add("CliTolMem", tvwChild, "DaftarPayFirst", "Daftar PayFirst", 2)
Set optre = TreeOP.Nodes.Add("CliTolMem", tvwChild, "Sisal", "Sisa Saldo", 2)
Set optre = TreeOP.Nodes.Add("CliTol", tvwChild, "SetPas", "Set Password", 2)
Set optre = TreeOP.Nodes.Add("CliTol", tvwChild, "Pes", "Pesan", 2)
Set optre = TreeOP.Nodes.Add("CliTol", tvwChild, "StopCli", "Stop Client", 2)
Set optre = TreeOP.Nodes.Add("CliTol", tvwChild, "PinCli", "Pindah Client", 2)
Set optre = TreeOP.Nodes.Add("CliTol", tvwChild, "ShutCli", "Shutdown Client", 2)
Set optre = TreeOP.Nodes.Add("CliTol", tvwChild, "Lis", "List Koneksi", 2)
Set optre = TreeOP.Nodes.Add("CliTol", tvwChild, "CliTolUti", "Utility", 1)
Set optre = TreeOP.Nodes.Add("CliTolUti", tvwChild, "ActiveP", "Activate porn Blocker", 2)
Set optre = TreeOP.Nodes.Add("CliTolUti", tvwChild, "DeactiveP", "Deactivate Porn Blocker", 2)
Set optre = TreeOP.Nodes.Add("CliTolUti", tvwChild, "LockCli", "Lock Client", 2)
Set optre = TreeOP.Nodes.Add("CliTolUti", tvwChild, "ULockCli", "Unlock Client", 2)
Set optre = TreeOP.Nodes.Add("CliTolUti", tvwChild, "Taskman", "Task Manager", 2)
Set optre = TreeOP.Nodes.Add("CliTolUti", tvwChild, "RemoD", "Remote Desktop", 2)
Set optre = TreeOP.Nodes.Add("CliTolUti", tvwChild, "Edt", "Edit IP Client", 2)
Set optre = TreeOP.Nodes.Add(, , "Laporan", "Laporan", 1)
Set optre = TreeOP.Nodes.Add("Laporan", tvwChild, "LapBil", "Laporan Billing Jasa", 2)
Set optre = TreeOP.Nodes.Add("Laporan", tvwChild, "LapBilPen", "Laporan Billing Penjualan", 2)
Set optre = TreeOP.Nodes.Add(, , "Security", "Security", 1)
Set optre = TreeOP.Nodes.Add("Security", tvwChild, "LogIn", "Log In", 2)
Set optre = TreeOP.Nodes.Add("Security", tvwChild, "LogOut", "Logout", 2)
Set optre = TreeOP.Nodes.Add("Security", tvwChild, "Lockbil", "Lock Billing", 2)
Set optre = TreeOP.Nodes.Add("Security", tvwChild, "LogOuts", "Tukar Operator", 2)
Set optre = TreeOP.Nodes.Add("Security", tvwChild, "RegDef", "Registry Defense", 2)
Set optre = TreeOP.Nodes.Add(, , "Aplikasi", "Aplikasi", 1)
Set optre = TreeOP.Nodes.Add("Aplikasi", tvwChild, "Fix", "Fix Files", 2)
Set optre = TreeOP.Nodes.Add("Aplikasi", tvwChild, "Laucn", "Launcher", 2)
Set optre = TreeOP.Nodes.Add("Aplikasi", tvwChild, "med", "Media Player", 2)
Set optre = TreeOP.Nodes.Add(, , "Styler", "Style", 1)
Set optre = TreeOP.Nodes.Add("Styler", tvwChild, "Style", "Styler", 2)
Set optre = TreeOP.Nodes.Add(, , "Relax", "Relax", 1)
Set optre = TreeOP.Nodes.Add("Relax", tvwChild, "Spac", "BlacK Space Impact", 2)
Set optre = TreeOP.Nodes.Add("Relax", tvwChild, "reg", "Register", 2)
Set optre = TreeOP.Nodes.Add(, , "Credit", "Credit", 1)
Set optre = TreeOP.Nodes.Add("Credit", tvwChild, "Space", "Help Menu", 2)
Set optre = TreeOP.Nodes.Add("Credit", tvwChild, "about", "About", 2)
Init
    MsgBox "Selamat datang " & usnm.Text & " di BLacK PeaRL Billing Server.", vbInformation, "Welcome"
    

End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call movof
End Sub

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
      PopupMenu mnuklik
      End If
End Sub


Private Sub Form_Resize()
ResizeForm Me
    Call AturGrid
End Sub

Private Sub Form_Unload(Cancel As Integer)
Load FrmLogOut
FrmLogOut.Show
End Sub



Private Sub framejam_MouseDown(Button As MouseButtonConstants, Shift As Integer, Control As Integer, X As Long, Y As Long)
framejam.Visible = False
End Sub

Private Sub frametanggal_MouseDown(Button As MouseButtonConstants, Shift As Integer, Control As Integer, X As Long, Y As Long)
frametanggal.Visible = False
End Sub

Private Sub Game_Click()
Load FrmSpaceImpact
FrmSpaceImpact.Show
End Sub


Private Sub GridStatusBayar_Click()
If GridStatusBayar.TextMatrix(GridStatusBayar.Row, 10) = "No" Then
txtnota.Text = GridStatusBayar.TextMatrix(GridStatusBayar.Row, 0)
Else
txtnota.Text = GridStatusBayar.TextMatrix(GridStatusBayar.Row, 10)
End If
txtws.Text = GridStatusBayar.TextMatrix(GridStatusBayar.Row, 2)
txtnamacli.Text = GridStatusBayar.TextMatrix(GridStatusBayar.Row, 3)
txtjen.Text = GridStatusBayar.TextMatrix(GridStatusBayar.Row, 4)
txtstart.Text = GridStatusBayar.TextMatrix(GridStatusBayar.Row, 5)
txtsel.Text = GridStatusBayar.TextMatrix(GridStatusBayar.Row, 6)
txtdur.Text = GridStatusBayar.TextMatrix(GridStatusBayar.Row, 7)
txttot.Text = GridStatusBayar.TextMatrix(GridStatusBayar.Row, 8)

End Sub

Private Sub GridStatusBayar_DblClick()
If FrameBayar.Visible = True Then
Exit Sub
Else
If GridStatusBayar.TextMatrix(GridStatusBayar.Row, 0) = "No." Then
Exit Sub
FrameBayar.Visible = False
Else
FrameBayar.Visible = True
loadpenj
With lvbar
For i = 1 To .ListItems.Count
 icount = Val(.ListItems(i).SubItems(4))
 itotal = itotal + icount
 Next i
 End With
 If lvbar.ListItems.Count = 0 Then
 lbltot.Caption = "Total Bayar = " & Val(txttot.Text)
 Else
 lbltot.Caption = "Total Belanja = " & itotal & "   Total Bayar(Total jasa + Total Belanja) =" & "(" & itotal + Val(txttot.Text) & ")"
 End If
End If
End If
End Sub
Private Sub loadpenj()
rec.Open "select penjualan.* from penjualan where penjualan.Nota= '" & txtnota.Text & "'and penjualan.jenis='" & "Jasa" & "' and penjualan.stat='" & "Pending" & "' and penjualan.cls='" & "No" & "'", conn, adOpenStatic, adLockOptimistic
With rec
While Not .EOF
Set lstItem = lvbar.ListItems.Add(, , lvbar.ListItems.Count + 1 & ".")
lstItem.SubItems(1) = rec(3)
lstItem.SubItems(2) = rec(5)
lstItem.SubItems(3) = rec(6)
lstItem.SubItems(4) = rec(7)
.MoveNext
Wend
End With
rec.Close

End Sub
Private Sub help_Click()
FrmHelp.Visible = True
End Sub

Private Sub Image3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
normal.Visible = True
End Sub

Private Sub klklock_Click()
Call mnuactiv_Click
End Sub

Private Sub klkpesan_Click()
Load FrmPesan
    FrmPesan.txtnoclient.Text = clientpopup
    FrmPesan.Show
    End Sub

Private Sub klkPindah_Click()
Load FrmPindahClient
    FrmPindahClient.TxtNoDari.Text = clientpopup
    FrmPindahClient.Show 1
End Sub

Private Sub klkradmin_Click()
FrmDesktopClient.Visible = True
End Sub

Private Sub klkshut_Click()
Load FrmShutdownClient
    FrmShutdownClient.txtnoclient.Text = clientpopup
    FrmShutdownClient.Show 1
End Sub

Private Sub klkstop_Click()
 Load FrmStopClient
    FrmStopClient.txtnoclient.Text = clientpopup
    FrmStopClient.Show 1
End Sub

Private Sub klkunlock_Click()
Call mnuunlock_Click
End Sub

Private Sub klref_Click()
ResizeForm Me

    Call AturGrid
    Call CekTemp
    Call CekRekap
    Call bahasa
    Call fotome
    Call loadpicmen
    Call checkoptime
End Sub

Private Sub Label10_Click()
Load FrmPendaftaranMember
FrmPendaftaranMember.BLacKFrame1.Caption = "Pendaftaran Member"
FrmPendaftaranMember.Show 1
End Sub

Private Sub Label10_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
imghov.Visible = False
imghov2.Visible = False
imghov3.Visible = False
imghov4.Visible = False
imghov5.Visible = False
imghov6.Visible = False
imghov7.Visible = False
imghov8.Visible = False
imghov9.Visible = True
imghov10.Visible = False
imghov11.Visible = False
imghov12.Visible = False
End Sub

Private Sub Label12_Click()
Load FrmPemakaianMember
FrmPemakaianMember.Show 1
End Sub

Private Sub Label12_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
imghov.Visible = False
imghov2.Visible = False
imghov3.Visible = False
imghov4.Visible = False
imghov5.Visible = False
imghov6.Visible = False
imghov7.Visible = True
imghov8.Visible = False
imghov9.Visible = False
imghov10.Visible = False
imghov11.Visible = False
imghov12.Visible = False
End Sub

Private Sub Label13_Click()
Load FrmEditIpClient
FrmEditIpClient.Show 1
End Sub

Private Sub Label13_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
imghov.Visible = False
imghov2.Visible = False
imghov3.Visible = False
imghov4.Visible = False
imghov5.Visible = True
imghov6.Visible = False
imghov7.Visible = False
imghov8.Visible = False
imghov9.Visible = False
imghov10.Visible = False
imghov11.Visible = False
imghov12.Visible = False

End Sub

Private Sub Label14_Click()
Load FrmConfig
FrmConfig.Show 1
End Sub

Private Sub Label14_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
imghov.Visible = False
imghov2.Visible = False
imghov3.Visible = False
imghov4.Visible = False
imghov5.Visible = False
imghov6.Visible = True
imghov7.Visible = False
imghov8.Visible = False
imghov9.Visible = False
imghov10.Visible = False
imghov11.Visible = False
imghov12.Visible = False
End Sub

Private Sub Label16_Click()
Load FrmBackup
FrmBackup.Show 1
End Sub

Private Sub Label16_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
imghov.Visible = False
imghov2.Visible = False
imghov3.Visible = False
imghov4.Visible = True
imghov5.Visible = False
imghov6.Visible = False
imghov7.Visible = False
imghov8.Visible = False
imghov9.Visible = False
imghov10.Visible = False
imghov11.Visible = False
imghov12.Visible = False

End Sub

Private Sub Label17_Click()
Load FrmAbout
FrmAbout.Show 1
End Sub

Private Sub Label17_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
imghov.Visible = False
imghov2.Visible = True
imghov3.Visible = False
imghov4.Visible = False
imghov5.Visible = False
imghov6.Visible = False
imghov7.Visible = False
imghov8.Visible = False
imghov9.Visible = False
imghov10.Visible = False
imghov11.Visible = False
imghov12.Visible = False

End Sub

Private Sub Label18_Click()
Load FrmRun
FrmRun.Show 1
End Sub

Private Sub Label18_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
imghov.Visible = False
imghov2.Visible = False
imghov3.Visible = True
imghov4.Visible = False
imghov5.Visible = False
imghov6.Visible = False
imghov7.Visible = False
imghov8.Visible = False
imghov9.Visible = False
imghov10.Visible = False
imghov11.Visible = False
imghov12.Visible = False

End Sub



Private Sub Label5_Click()
FrmDesktopClient.Visible = True
End Sub

Private Sub Label5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
imghov.Visible = False
imghov2.Visible = False
imghov3.Visible = False
imghov4.Visible = False
imghov5.Visible = False
imghov6.Visible = False
imghov7.Visible = False
imghov8.Visible = False
imghov9.Visible = False
imghov10.Visible = False
imghov11.Visible = False
imghov12.Visible = True
End Sub

Private Sub Label6_Click()
Call mnuunlock_Click
End Sub

Private Sub Label6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
imghov.Visible = False
imghov2.Visible = False
imghov3.Visible = False
imghov4.Visible = False
imghov5.Visible = False
imghov6.Visible = False
imghov7.Visible = False
imghov8.Visible = False
imghov9.Visible = False
imghov10.Visible = True
imghov11.Visible = False
imghov12.Visible = False
End Sub

Private Sub Label7_Click()
Load FrmHelp
FrmHelp.Show 1
End Sub

Private Sub Label7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
imghov.Visible = True
imghov2.Visible = False
imghov3.Visible = False
imghov4.Visible = False
imghov5.Visible = False
imghov6.Visible = False
imghov7.Visible = False
imghov8.Visible = False
imghov9.Visible = False
imghov10.Visible = False
imghov11.Visible = False
imghov12.Visible = False
End Sub

Private Sub Label8_Click()
Call as_Click
End Sub


Private Sub Label8_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
imghov.Visible = False
imghov2.Visible = False
imghov3.Visible = False
imghov4.Visible = False
imghov5.Visible = False
imghov6.Visible = False
imghov7.Visible = False
imghov8.Visible = False
imghov9.Visible = False
imghov10.Visible = False
imghov11.Visible = True
imghov12.Visible = False
End Sub

Private Sub Label9_Click()
Load FrmTambahSaldo
FrmTambahSaldo.Show 1
End Sub

Private Sub Label9_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
imghov.Visible = False
imghov2.Visible = False
imghov3.Visible = False
imghov4.Visible = False
imghov5.Visible = False
imghov6.Visible = False
imghov7.Visible = False
imghov8.Visible = True
imghov9.Visible = False
imghov10.Visible = False
imghov11.Visible = False
imghov12.Visible = False
End Sub

Private Sub locks_Click()
Load FrmLogin
Me.WindowState = 1
FrmLogin.TxtUser.Text = usnm.Text
FrmLogin.TxtUser.Enabled = False
FrmLogin.txtstatus.Text = "lock"
FrmLogin.CmdBatal.Enabled = False
FrmLogin.BLacKFrame1.Caption = "Type Only Password To Unlock Billing"
FrmLogin.Show
FrmMain.Enabled = False
End Sub

Private Sub lvbar_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If GridStatusBayar.TextMatrix(GridStatusBayar.Row, 10) = "No" Then
Exit Sub
Else
    If Button = 2 Then
    Dim Pt As POINTAPI
    Dim ret As Long
    RMenu = CreatePopupMenu()
    AppendMenu RMenu, MF_STRING, 2, "Simpan penjualan"
    AppendMenu RMenu, MF_STRING, 3, "Simpan Semua Penjualan"
    AppendMenu RMenu, MF_STRING, 1, "Hapus"
    GetCursorPos Pt
    ret = TrackPopupMenuEx(RMenu, TPM_LEFTALIGN Or TPM_RETURNCMD Or TPM_RIGHTBUTTON, Pt.X, Pt.Y, Me.hWnd, ByVal 0&)
   Select Case ret
   Case 1
   If lvbar.ListItems.Count = 0 Then
   MsgBox "Tidak ada penjualan pada Client ini.", vbInformation, "Blank"
   Exit Sub
   Else
   If MsgBox("Masukkan data ke stock barang, pilihan ini akan menambahkan barang yang telah di beli oleh client.", vbYesNo) = vbYes Then
   
   rec.Open "select Penjualan.* From Penjualan where penjualan.Nota='" & txtnota.Text & "' and penjualan.namabarang='" & lvbar.SelectedItem.SubItems(1) & "'", conn, adOpenStatic, adLockOptimistic
   rec.Delete
   rec.Close
   
   rec.Open "select databarang.* from databarang where databarang.namabarang ='" & lvbar.SelectedItem.SubItems(1) & "'", conn, adOpenStatic, adLockOptimistic
   rec(3) = Val(rec(3)) + Val(lvbar.SelectedItem.SubItems(3))
   rec.Update
   rec.Close
   Else
   rec.Open "select Penjualan.* From Penjualan where penjualan.Nota='" & txtnota.Text & "' and penjualan.namabarang='" & lvbar.SelectedItem.SubItems(1) & "'", conn, adOpenStatic, adLockOptimistic
   rec.Delete
   rec.Close
End If
   lvbar.ListItems.Clear
   loadpenj
   End If
   Case 3
   rec.Open "select penjualan.* from penjualan where penjualan.Nota= '" & txtnota.Text & "'and penjualan.jenis='" & "Jasa" & "' and penjualan.stat='" & "Pending" & "' and penjualan.cls='" & "No" & "'", conn, adOpenStatic, adLockOptimistic
    rec.MoveFirst
    While Not rec.EOF
    rec(8) = "Approve"
    rec(9) = "Yes"
    rec.MoveNext
    Wend
    rec.Close
   lvbar.ListItems.Clear
   loadpenj
Case 2
   rec.Open "select penjualan.* from penjualan where penjualan.Nota= '" & txtnota.Text & "'and penjualan.jenis='" & "Jasa" & "' and penjualan.stat='" & "Pending" & "' and penjualan.cls='" & "No" & "'and penjualan.namabarang='" & lvbar.SelectedItem.SubItems(1) & "'", conn, adOpenStatic, adLockOptimistic
    rec.MoveFirst
    While Not rec.EOF
    rec(8) = "Approve"
    rec(9) = "Yes"
    rec.MoveNext
    Wend
    rec.Close
   lvbar.ListItems.Clear
   loadpenj
   End Select
   
End If
End If
End Sub

Private Sub menus_Click()
Exp.Visible = True
End Sub

Private Sub mnuabout_Click()
    Load FrmAbout
    FrmAbout.Show 1
End Sub

Private Sub mnuactiv_Click()
Load FrmLock
FrmLock.txtnoclient.Text = clientpopup
FrmLock.CmdLock.Caption = "Lock"
FrmLock.c.Caption = "Lock Client"
FrmLock.Show 1
End Sub

Private Sub mnuactivbil_Click()
Load FrmActivePorn
FrmActivePorn.txtnoclient.Text = clientpopup
FrmActivePorn.BLacKFrame1.Caption = "Open Client"
FrmActivePorn.cmdActive.Caption = "Buka Client"
FrmActivePorn.Show 1
End Sub

Private Sub mnuappblock_Click()
 Load FrmAppBlock
    FrmAppBlock.txtnoclient.Text = clientpopup
    FrmAppBlock.Show 1

End Sub

Private Sub mnubackup_Click()
    Load FrmBackup
    FrmBackup.Show 1
End Sub

Private Sub MnuBarang_Click()
Load FrmInputBarang
FrmInputBarang.Frame.Caption = "Master Barang"
FrmInputBarang.Label1.Caption = "Stock Awal"
FrmInputBarang.Show 1

End Sub

Private Sub MnuChange_Click()
shut_Click
End Sub
Private Sub Mnuchanges_Click()
frmstyle.Visible = True
End Sub

Private Sub mnuchatserv_Click()
Load FrmChatserver
FrmChatserver.Show
End Sub

Private Sub MnuClose_Click()
Load FrmActivePorn
FrmActivePorn.txtnoclient.Text = clientpopup
FrmActivePorn.BLacKFrame1.Caption = "Close Client "
FrmActivePorn.cmdActive.Caption = "Tutup Client"
FrmActivePorn.Show 1

End Sub

Private Sub mnuconfdat_Click()
Load FrmDatabases
FrmDatabases.Show 1

End Sub

Private Sub mnuconfig_Click()
    Load FrmConfig
    FrmConfig.Show 1
End Sub

Private Sub Mnudeac_Click()
Load FrmActivePorn
FrmActivePorn.txtnoclient.Text = clientpopup
FrmActivePorn.BLacKFrame1.Caption = "Close Client "
FrmActivePorn.cmdActive.Caption = "Tutup Client"
FrmActivePorn.Show 1
End Sub

Private Sub MnuDefense_Click()
Load FrmDefen
FrmDefen.Show 1
End Sub

Private Sub mnudeposit_Click()
    Load FrmPemakaianMember
    FrmPemakaianMember.Show 1
End Sub

Private Sub MnuEdit_Click()
Load FrmStyles
FrmStyles.Show
End Sub

Private Sub MnuFix_Click()
FrmFixFile.Visible = True
End Sub

Private Sub mnulappemb_Click()
Load FrmJual
FrmJual.framelap.Caption = "Laporan Pembelian"
FrmJual.Show 1

End Sub

Private Sub MnuList_Click()
Load FrmStatus
FrmStatus.Show 1
End Sub

Private Sub MnuLock_Click()
locks_Click
End Sub

Private Sub mnumati_Click()
Unload Me
End Sub

Private Sub mnumember_Click()
    Load FrmPendaftaranMember
    FrmPendaftaranMember.Show 1
End Sub

Private Sub MnuOpen_Click()
Load FrmActivePorn
FrmActivePorn.txtnoclient.Text = clientpopup
FrmActivePorn.BLacKFrame1.Caption = "Open Client "
FrmActivePorn.cmdActive.Caption = "Buka Client"
FrmActivePorn.Show 1
End Sub

Private Sub mnupassadmin_Click()
    Load FrmPasswordRoot
    FrmPasswordRoot.Show 1
End Sub

Private Sub MnuPayFirst_Click()
Load FrmPendaftaranMember
FrmPendaftaranMember.BLacKFrame1.Caption = "Pendaftaran PayFirst"
FrmPendaftaranMember.Label6.Caption = "Duration"
FrmPendaftaranMember.Label7.Caption = "Bayar 1st"
FrmPendaftaranMember.OpPay.value = True
FrmPendaftaranMember.Show 1
End Sub

Private Sub mnupemb_Click()
Load FrmInputBarang
FrmInputBarang.Frame.Caption = "Pembelian"
FrmInputBarang.Label1.Caption = "Banyak Beli"
FrmInputBarang.txthargabel.Locked = True
FrmInputBarang.txthargajual.Locked = True
FrmInputBarang.Show 1
End Sub

Private Sub MnuPenj_Click()
Load FrmPenjualan
With FrmPenjualan
.txtnoclient.Visible = False
.Shape2.Visible = False
.Label1.Visible = False
.Label7.Visible = False
.txtws.Visible = False
.Shape3.Visible = False
.Label6.Top = 2040
.Label6.Left = 2400
.txtstock.Top = 2085
.txtstock.Left = 3270
.Shape4.Top = 2040
.Shape4.Left = 3240
End With

FrmPenjualan.framepenj.Caption = "Penjualan"
FrmPenjualan.Show 1
End Sub

Private Sub MnuPenjualans_Click()
If MSFlexGrid.TextMatrix(MSFlexGrid.Row, 2) = "" Or MSFlexGrid.TextMatrix(MSFlexGrid.Row, 3) = "Available" Then
Exit Sub
Else
Load FrmPenjualan
FrmPenjualan.txtws.Text = MSFlexGrid.TextMatrix(MSFlexGrid.Row, 0)
FrmPenjualan.txtnoclient.Text = MSFlexGrid.TextMatrix(MSFlexGrid.Row, 2)
FrmPenjualan.Show 1
End If
End Sub

Private Sub mnupesan_Click()
    Load FrmPesan
    FrmPesan.txtnoclient.Text = clientpopup
    FrmPesan.Show 1
End Sub

Private Sub mnupindah_Click()
    Load FrmPindahClient
    FrmPindahClient.TxtNoDari.Text = clientpopup
    FrmPindahClient.Show 1
End Sub


Private Sub mnureg_Click()
Load FrmRegister
FrmRegister.Show 1
End Sub

Private Sub mnurekap_Click()
    Load FrmLaporanBilling
    FrmLaporanBilling.Show 1
End Sub


Private Sub mnures_Click()
ResizeForm Me
End Sub

Private Sub mnushutdown_Click()
    Load FrmShutdownClient
    FrmShutdownClient.txtnoclient.Text = clientpopup
    FrmShutdownClient.Show 1
End Sub

Private Sub MnuStartLog_Click()
Load FrmActivePorn
FrmActivePorn.txtnoclient.Text = clientpopup
FrmActivePorn.cmdActive.Caption = "Mulai Log"
FrmActivePorn.Show 1

End Sub

Private Sub MnuStartLogF_Click()
Load FrmActivePorn
FrmActivePorn.txtnoclient.Text = clientpopup
FrmActivePorn.cmdActive.Caption = "Mulai Log"
FrmActivePorn.Show 1

End Sub

Private Sub mnustop_Click()
    Load FrmStopClient
    FrmStopClient.txtnoclient.Text = clientpopup
    FrmStopClient.Show 1
End Sub

Private Sub MnuStopLog_Click()
Load FrmActivePorn
FrmActivePorn.txtnoclient.Text = clientpopup
FrmActivePorn.cmdActive.Caption = "Berhenti Log"
FrmActivePorn.Show 1

End Sub

Private Sub MnuStopLogF_Click()
Load FrmActivePorn
FrmActivePorn.txtnoclient.Text = clientpopup
FrmActivePorn.cmdActive.Caption = "Berhenti Log"
FrmActivePorn.Show 1
End Sub

Private Sub mnutask_Click()
Load FrmProc
FrmProc.txtnoclient.Text = clientpopup
FrmProc.Show 1
End Sub

Private Sub mnutask1_Click()
Load FrmProc
FrmProc.txtnoclient.Text = clientpopup
FrmProc.Show 1
End Sub

Private Sub mnuunlock_Click()
Load FrmLock
FrmLock.txtnoclient.Text = clientpopup
FrmLock.CmdLock.Caption = "Unlock"
FrmLock.c.Caption = "Unlock Client"
FrmLock.Show 1
End Sub

Private Sub MnuURL_Click()
Load FrmUrl
FrmUrl.txtnoclient.Text = clientpopup
FrmUrl.Show
End Sub

Private Sub mnuuser_Click()
    Load FrmPendaftaranUser
    FrmPendaftaranUser.Show 1
End Sub
Private Sub CekLogin()
'On Error GoTo hell
    rec.Open "SELECT log.* FROM log WHERE log.path = 'server'", conn, adOpenStatic, adLockOptimistic
    If Not rec.RecordCount = 0 Then
        usnm.Text = rec(2)
        nm.Text = rec(3)
        lgas.Text = rec(4)
        If rec(4) = "root" Then
            Call MenuRoot
        ElseIf rec(4) = "admin" Then
            Call MenuAdmin
        ElseIf rec(4) = "user" Then
            Call MenuUser
        End If
         rec.Close
'        tgl.Caption = Format(Date, "dddd, dd mmmm yyyy")
'        jam.Caption = Format(Time, "hh:nn:ss")
    Else
     rec.Close
        MsgBox "Error, Log billing gagal, contact software information di " & HomePage & "", vbOKOnly + vbCritical, "System Crash!"
        
        'End
    End If
   
'IfNoErr:
'Exit Sub
'hell:
' TulisError Err.Description, Err.Number, "CekLogin", Me.Name
' Resume IfNoErr
End Sub

Private Sub MnuViewBel_Click()
If MSFlexGrid.TextMatrix(MSFlexGrid.Row, 2) = "" Or MSFlexGrid.TextMatrix(MSFlexGrid.Row, 3) = "Available" Then
Exit Sub
ElseIf MSFlexGrid.TextMatrix(MSFlexGrid.Row, 9) = "No" Then
MsgBox "Daftar belanja client kosong.", vbInformation, "Blank"
Else
Load FrmPenjView
FrmPenjView.txtws.Text = MSFlexGrid.TextMatrix(MSFlexGrid.Row, 0)
FrmPenjView.txtnoclient.Text = MSFlexGrid.TextMatrix(MSFlexGrid.Row, 2)
FrmPenjView.Show 1
End If

End Sub

Private Sub MSFlexGrid_Click()
    clientpopup = MSFlexGrid.Row
    FrmPindahClient.lblclient.Caption = MSFlexGrid.TextMatrix(MSFlexGrid.Row, 2)
    FrmPindahClient.lblstat.Caption = MSFlexGrid.TextMatrix(MSFlexGrid.Row, 7)
End Sub

Private Sub MSFlexGrid_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call movof
normal.Visible = True
End Sub

Private Sub MSFlexGrid_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then

PopupMenu mnuklik



  End If
End Sub




Private Sub rad_Click()
FrmDesktopClient.Visible = True
End Sub
Private Sub rnt_Click()
cmdlaporanpenjualan_Click
End Sub

Private Sub shut_Click()
Unload Me
Load FrmLogin
Unload FrmLogOut
FrmLogin.CmdBatal.Enabled = False
FrmLogin.BLacKFrame1.Caption = "Change Operator"
FrmLogin.Show
End Sub



Private Sub TimerAktif_Timer()
'On Error GoTo hell
If chkawal.Caption = "30 Menit" Then
        For i = 1 To ClientMax
            If MSFlexGrid.TextMatrix(i, 3) = setAktif Then
                inta = "00:30:00"
                durasi(i) = Now - mulai(i)
                atas(i) = Int(Val(Format(durasi(i), "nn")) / interval)
                ataspel(i) = Int(Val(Format(durasi(i), "nn")) / intervalpel)
                atasmem(i) = Int(Val(Format(durasi(i), "nn")) / intervalmem)
                atasgam(i) = Int(Val(Format(durasi(i), "nn")) / intervalgam)
                atasmen(i) = Int(Val(Format(durasi(i), "nn")) / intervalmen)
                bawah(i) = atas(i) + 1
                bawahpel(i) = ataspel(i) + 1
                bawahmem(i) = atasmem(i) + 1
                bawahgam(i) = atasgam(i) + 1
                bawahmen(i) = atasmen(i) + 1
                If MSFlexGrid.TextMatrix(i, 7) = setPersonal Then
                If inta <= Format(durasi(i), "hh:mm:ss") Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_personal * 60 / interval) + (bawah(i) * harga_personal), 2)
                        Else
                        biaya(i) = awal_personal
                        End If
                       biaya_disc(i) = biaya(i) * Discount / 100
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setPelajar Then
                If inta <= Format(durasi(i), "hh:mm:ss") Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_pelajar * 60 / intervalpel) + (bawahpel(i) * harga_pelajar), 2)
                        Else
                        biaya(i) = awal_pelajar
                        End If
                        biaya_disc(i) = biaya(i) * Discount / 100
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setMember Then
                If inta <= Format(durasi(i), "hh:mm:ss") Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_member * 60 / intervalmem) + (bawahmem(i) * harga_member), 2)
                        Else
                        biaya(i) = awal_member
                        End If
                        biaya_disc(i) = biaya(i) * Discount / 100
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setPayFirst Then
                rec.Open "SELECT prepaid.* FROM prepaid WHERE prepaid.user ='" & MSFlexGrid.TextMatrix(i, 2) & "'", conn, , adLockOptimistic
                    biaya(i) = rec(5)
                    If rec(3) <= Format(durasi(i), "hh:mm:ss") Then
                    With FrmPopup
                    On Error Resume Next
                    .lbl.Caption = "Time PayFirst is Done."
                    .lbl1.Caption = "PayFirst Workstation " & MSFlexGrid.TextMatrix(i, 0) & " Telah habis, Stop Workstation " & MSFlexGrid.TextMatrix(i, 0) & ""
                    .Visible = True
                    End With
                    End If
                    biaya_disc(i) = biaya(i) * Discount / 100
                    Set rec = Nothing
                ElseIf MSFlexGrid.TextMatrix(i, 7) = "Operator" Then
                    biaya(i) = 0
                    biaya_disc(i) = 0
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setGame Then
                If inta <= Format(durasi(i), "hh:mm:ss") Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_game * 60 / intervalgam) + (bawahgam(i) * harga_game), 2)
                        Else
                        biaya(i) = awal_game
                        End If
                        biaya_disc(i) = biaya(i) * Discount / 100
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setKetik Then
                If inta <= Format(durasi(i), "hh:mm:ss") Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_ketik * 60 / intervalmen) + (bawahmen(i) * harga_ketik), 2)
                        Else
                        biaya(i) = awal_ketik
                        End If
                        biaya_disc(i) = biaya(i) * Discount / 100
                End If
                If Format(durasi(i), "hh:nn:ss") >= jed Then
                
                total(i) = biaya(i)
                MSFlexGrid.TextMatrix(i, 5) = Format(durasi(i), "hh:nn:ss")
                MSFlexGrid.TextMatrix(i, 6) = Format(biaya(i), "#,###")
                MSFlexGrid.TextMatrix(i, 8) = ""
                MSFlexGrid.TextMatrix(i, 10) = Format(total(i), "#,###")
                Else
                MSFlexGrid.TextMatrix(i, 5) = Format(durasi(i), "hh:nn:ss")
                MSFlexGrid.TextMatrix(i, 6) = "Waiting"
                MSFlexGrid.TextMatrix(i, 8) = "Waiting"
                MSFlexGrid.TextMatrix(i, 10) = "Waiting"
                End If
            End If
        Next i
        ElseIf chkawal.Caption = "Advance" Then
        For i = 1 To ClientMax
            If MSFlexGrid.TextMatrix(i, 3) = setAktif Then
                durasi(i) = Now - mulai(i)
                atas(i) = Int(Val(Format(durasi(i), "nn")) / interval)
                ataspel(i) = Int(Val(Format(durasi(i), "nn")) / intervalpel)
                atasmem(i) = Int(Val(Format(durasi(i), "nn")) / intervalmem)
                atasgam(i) = Int(Val(Format(durasi(i), "nn")) / intervalgam)
                atasmen(i) = Int(Val(Format(durasi(i), "nn")) / intervalmen)
                bawah(i) = atas(i) + 1
                bawahpel(i) = ataspel(i) + 1
                bawahmem(i) = atasmem(i) + 1
                bawahgam(i) = atasgam(i) + 1
                bawahmen(i) = atasmen(i) + 1
                If MSFlexGrid.TextMatrix(i, 7) = setPersonal Then
                    If Val(Format(durasi(i), "nn")) / interval >= atas(i) And Val(Format(durasi(i), "nn")) / interval <= bawah(i) Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_personal * 60 / interval) + (bawah(i) * harga_personal), 2)
                        biaya_disc(i) = biaya(i) * Discount / 100
                    End If
                    If biaya(i) <= awal_personal Then
                        biaya(i) = awal_personal
                    End If
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setPelajar Then
                    If Val(Format(durasi(i), "nn")) / intervalpel >= ataspel(i) And Val(Format(durasi(i), "nn")) / intervalpel <= bawahpel(i) Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_pelajar * 60 / intervalpel) + (bawahpel(i) * harga_pelajar), 2)
                        biaya_disc(i) = biaya(i) * Discount / 100
                    End If
                    If biaya(i) <= awal_pelajar Then
                        biaya(i) = awal_pelajar
                    End If
                    
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setMember Then
                    If Val(Format(durasi(i), "nn")) / intervalmem >= atasmem(i) And Val(Format(durasi(i), "nn")) / intervalmem <= bawahmem(i) Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_member * 60 / intervalmem) + (bawahmem(i) * harga_member), 2)
                        biaya_disc(i) = biaya(i) * Discount / 100
                    End If
                    If biaya(i) <= awal_member Then
                        biaya(i) = awal_member
                    End If
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setPayFirst Then
                rec.Open "SELECT prepaid.* FROM prepaid WHERE prepaid.user ='" & MSFlexGrid.TextMatrix(i, 2) & "'", conn, , adLockOptimistic
                    biaya(i) = rec(5)
                    If rec(3) <= Format(durasi(i), "hh:mm:ss") Then
                    paystat = "Done"
                    payst = rec(12)
                    paydone = MSFlexGrid.TextMatrix(i, 0)
                     With FrmPopup
                    On Error Resume Next
                    .lbl.Caption = "Time PayFirst is Done."
                    .lbl1.Caption = "PayFirst Workstation " & MSFlexGrid.TextMatrix(i, 0) & " Telah habis, Stop Workstation " & MSFlexGrid.TextMatrix(i, 0) & ""
                    .Visible = True
                    
                    End With
                    If payst = "Yes" Then
                    FrmStopClient.txtnoclient.Text = paydone
                    FrmStopClient.tmrauto.Enabled = True
                    Else
                    FrmStopClient.tmrauto.Enabled = False
                    End If
                    End If
                    biaya_disc(i) = biaya(i) * Discount / 100
                    rec.Close
                ElseIf MSFlexGrid.TextMatrix(i, 7) = "Operator" Then
                    biaya(i) = 0
                    biaya_disc(i) = 0
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setGame Then
                    If Val(Format(durasi(i), "nn")) / intervalgam >= atasgam(i) And Val(Format(durasi(i), "nn")) / intervalgam <= bawahgam(i) Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_game * 60 / intervalgam) + (bawahgam(i) * harga_game), 2)
                        biaya_disc(i) = biaya(i) * Discount / 100
                    End If
                    If biaya(i) <= awal_game Then
                        biaya(i) = awal_game
                    End If
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setKetik Then
                    If Val(Format(durasi(i), "nn")) / intervalmen >= atasmen(i) And Val(Format(durasi(i), "nn")) / intervalmen <= bawahmen(i) Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_ketik * 60 / intervalmen) + (bawahmen(i) * harga_ketik), 2)
                        biaya_disc(i) = biaya(i) * Discount / 100
                    End If
                    If biaya(i) <= awal_ketik Then
                        biaya(i) = awal_ketik
                    End If
                End If
                If Format(durasi(i), "hh:nn:ss") >= jed Then

                total(i) = biaya(i) - biaya_disc(i)
                MSFlexGrid.TextMatrix(i, 5) = Format(durasi(i), "hh:nn:ss")
                MSFlexGrid.TextMatrix(i, 6) = Format(biaya(i), "#,###")
                MSFlexGrid.TextMatrix(i, 8) = Format(biaya_disc(i), "#,###")
                MSFlexGrid.TextMatrix(i, 10) = Format(total(i), "#,###")
               
                Else
                MSFlexGrid.TextMatrix(i, 5) = Format(durasi(i), "hh:nn:ss")
                MSFlexGrid.TextMatrix(i, 6) = "Waiting"
                MSFlexGrid.TextMatrix(i, 8) = "Waiting"
                MSFlexGrid.TextMatrix(i, 10) = "Waiting"
                End If
                
            End If
        Next i
        
        ElseIf chkawal.Caption = "Auto" Then
        For i = 1 To ClientMax
            If MSFlexGrid.TextMatrix(i, 3) = setAktif Then
                durasi(i) = Now - mulai(i)
                atas(i) = Int(Val(Format(durasi(i), "nn")) / interval)
                ataspel(i) = Int(Val(Format(durasi(i), "nn")) / intervalpel)
                atasmem(i) = Int(Val(Format(durasi(i), "nn")) / intervalmem)
                atasgam(i) = Int(Val(Format(durasi(i), "nn")) / intervalgam)
                atasmen(i) = Int(Val(Format(durasi(i), "nn")) / intervalmen)
                bawah(i) = atas(i) + 1
                bawahpel(i) = ataspel(i) + 1
                bawahmem(i) = atasmem(i) + 1
                bawahgam(i) = atasgam(i) + 1
                bawahmen(i) = atasmen(i) + 1
                If MSFlexGrid.TextMatrix(i, 7) = setPersonal Then
                    If Val(Format(durasi(i), "nn")) / interval >= atas(i) And Val(Format(durasi(i), "nn")) / interval <= bawah(i) Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_personal * 60 / interval) + (bawah(i) * harga_personal), 2)
                        biaya_disc(i) = biaya(i) * Discount / 100
                    End If
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setPelajar Then
                    If Val(Format(durasi(i), "nn")) / intervalpel >= ataspel(i) And Val(Format(durasi(i), "nn")) / intervalpel <= bawahpel(i) Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_pelajar * 60 / intervalpel) + (bawahpel(i) * harga_pelajar), 2)
                        biaya_disc(i) = biaya(i) * Discount / 100
                    End If
                    
                    
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setMember Then
                    If Val(Format(durasi(i), "nn")) / intervalmem >= atasmem(i) And Val(Format(durasi(i), "nn")) / intervalmem <= bawahmem(i) Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_member * 60 / intervalmem) + (bawahmem(i) * harga_member), 2)
                        biaya_disc(i) = biaya(i) * Discount / 100
                    End If
                    
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setPayFirst Then
                rec.Open "SELECT prepaid.* FROM prepaid WHERE prepaid.user ='" & MSFlexGrid.TextMatrix(i, 2) & "'", conn, , adLockOptimistic
                    biaya(i) = rec(5)
                    If rec(3) <= Format(durasi(i), "hh:mm:ss") Then
                     With FrmPopup
                    On Error Resume Next
                    .lbl.Caption = "Time PayFirst is Done."
                    .lbl1.Caption = "PayFirst Workstation " & MSFlexGrid.TextMatrix(i, 0) & " Telah habis, Stop Workstation " & MSFlexGrid.TextMatrix(i, 0) & ""
                    .Visible = True
                    End With
                    End If
                    biaya_disc(i) = biaya(i) * Discount / 100
                    Set rec = Nothing

                ElseIf MSFlexGrid.TextMatrix(i, 7) = "Operator" Then
                    biaya(i) = 0
                    biaya_disc(i) = 0
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setGame Then
                    If Val(Format(durasi(i), "nn")) / intervalgam >= atasgam(i) And Val(Format(durasi(i), "nn")) / intervalgam <= bawahgam(i) Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_game * 60 / intervalgam) + (bawahgam(i) * harga_game), 2)
                        biaya_disc(i) = biaya(i) * Discount / 100
                    End If
                    
                ElseIf MSFlexGrid.TextMatrix(i, 7) = setKetik Then
                    If Val(Format(durasi(i), "nn")) / intervalmen >= atasmen(i) And Val(Format(durasi(i), "nn")) / intervalmen <= bawahmen(i) Then
                        biaya(i) = Round((Val(Mid(Format(durasi(i), "hh:nn:ss"), 1, 2)) * harga_ketik * 60 / intervalmen) + (bawahmen(i) * harga_ketik), 2)
                        biaya_disc(i) = biaya(i) * Discount / 100
                    End If
                    
                End If
                If Format(durasi(i), "hh:nn:ss") >= jed Then
                
                total(i) = biaya(i) - biaya_disc(i)
                MSFlexGrid.TextMatrix(i, 5) = Format(durasi(i), "hh:nn:ss")
                MSFlexGrid.TextMatrix(i, 6) = Format(biaya(i), "#,###")
                MSFlexGrid.TextMatrix(i, 8) = Format(biaya_disc(i), "#,###")
                MSFlexGrid.TextMatrix(i, 10) = Format(total(i), "#,###")

                Else
                
                MSFlexGrid.TextMatrix(i, 5) = Format(durasi(i), "hh:nn:ss")
                MSFlexGrid.TextMatrix(i, 6) = "Waiting"
                MSFlexGrid.TextMatrix(i, 8) = "Waiting"
                MSFlexGrid.TextMatrix(i, 10) = "Waiting"
                End If
            End If
            

            
        Next i
    End If


   For i = 1 To ClientMax
If MSFlexGrid.TextMatrix(i, 7) = "Operator" And MSFlexGrid.TextMatrix(i, 3) = "Connected" Then
            rec.Open "Select Useraccount.* from useraccount where useraccount.username='" & MSFlexGrid.TextMatrix(i, 2) & "'", conn, adOpenStatic, adLockOptimistic
            If rec.RecordCount = 0 Then
            rec.Close
            Else
            If rec(7) <= 0 Then
            rec.Close
            rec.Open "SELECT ip.*,port.port FROM ip,port WHERE ip.ip = port.ip AND ip.no_client = " & MSFlexGrid.TextMatrix(i, 0), conn, adOpenStatic, adLockOptimistic
            Winsock(rec(2)).SendData "stoping|_|_|_|_|_|_|"
            rec.Close
            ElseIf Val(rec(7)) > 0 Then
            rec(7) = Val(rec(7)) - 1
            rec.Update
            rec.Close
            End If
            End If
            End If
          Next i
          'error whn opn
'rec.Open "Chat", conn, adOpenStatic, adLockOptimistic
'If rec.RecordCount >= 1 Then
'FrmChatserver.Visible = True
'rec.Close
'ElseIf rec.RecordCount = 0 Then
'rec.Close
'End If

    frametanggal.Caption = Format(Date, "dddd, dd mmmm yyyy")
    framejam.Caption = Format(Time, "hh:nn:ss")
'IfNoErr:
'Exit Sub
'hell:
' TulisError Err.Description, Err.Number, "TimerAktif", Me.Name
' Resume IfNoErr
End Sub


Private Sub AturGrid()
'On Error GoTo hell
Dim w As New ClSINI
w.FileName = App.path & "\GridSet.ini"
w.ApplicationKey = "gridwidht"
    MSFlexGrid.Rows = ClientMax + 1
    MSFlexGrid.ColWidth(0) = 300
    For i = 1 To ClientMax
        MSFlexGrid.TextMatrix(i, 0) = i
    Next i
    
    MSFlexGrid.TextMatrix(0, 1) = setClient
    MSFlexGrid.TextMatrix(0, 2) = setNamaUser
    MSFlexGrid.TextMatrix(0, 3) = setStatus
    MSFlexGrid.TextMatrix(0, 4) = setMulai
    MSFlexGrid.TextMatrix(0, 5) = setDurasi
    MSFlexGrid.TextMatrix(0, 6) = setBiaya
    MSFlexGrid.TextMatrix(0, 7) = setJenis
    MSFlexGrid.TextMatrix(0, 8) = "Happy Hours"
    MSFlexGrid.TextMatrix(0, 9) = "Belanja"
    MSFlexGrid.TextMatrix(0, 10) = setTotal
    MSFlexGrid.ColWidth(0) = w.GetValue("no", "1")
    MSFlexGrid.ColWidth(1) = w.GetValue("ws", "1")
    MSFlexGrid.ColWidth(2) = w.GetValue("namaclient", "1")
    MSFlexGrid.ColWidth(3) = w.GetValue("status", "1")
    MSFlexGrid.ColWidth(4) = w.GetValue("mulai", "1")
    MSFlexGrid.ColWidth(5) = w.GetValue("durasi", "1")
    MSFlexGrid.ColWidth(6) = w.GetValue("biaya", "1")
    MSFlexGrid.ColWidth(7) = w.GetValue("jenis", "1")
    MSFlexGrid.ColWidth(8) = w.GetValue("happy", "1")
    MSFlexGrid.ColWidth(9) = w.GetValue("belanja", "1")
    MSFlexGrid.ColWidth(10) = w.GetValue("total", "1")
    
    GridStatusBayar.ColWidth(0) = w.GetValue("nos", "1")
    GridStatusBayar.ColWidth(1) = w.GetValue("tanggal", "1")
    GridStatusBayar.ColWidth(2) = w.GetValue("wss", "1")
    GridStatusBayar.ColWidth(3) = w.GetValue("namaclients", "1")
    GridStatusBayar.ColWidth(4) = w.GetValue("statuss", "1")
    GridStatusBayar.ColWidth(5) = w.GetValue("mulais", "1")
    GridStatusBayar.ColWidth(6) = w.GetValue("durasis", "1")
    GridStatusBayar.ColWidth(7) = w.GetValue("selesais", "1")
    GridStatusBayar.ColWidth(8) = w.GetValue("jeniss", "1")
    GridStatusBayar.ColWidth(10) = w.GetValue("belanjas", "1")
'IfNoErr:
'Exit Sub
'hell:
'TulisError Err.Description, Err.Number, "AturGrid", Me.Name
'Resume IfNoErr

End Sub
Private Sub CekTemp()
On Error GoTo hell

    For i = 1 To ClientMax
        rec.Open "SELECT aktifitas.* FROM aktifitas WHERE aktifitas.no_client = " & i & " AND aktifitas.status = '" & "aktif" & " '", conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
            mulai(i) = CDate(rec(4))
            If mulai(i) >= mulai_disc Then
                disc_mulai(i) = mulai(i)
            Else
                disc_mulai(i) = mulai_disc
            End If
            MSFlexGrid.TextMatrix(i, 1) = setClient & rec(0) ' no client
            MSFlexGrid.TextMatrix(i, 2) = rec(3) 'user
            If rec(1) = "aktif" Then
                MSFlexGrid.TextMatrix(i, 3) = setAktif 'status
            ElseIf rec(1) = "bebas" Then
            MSFlexGrid.TextMatrix(i, 1) = setClient
            End If
            MSFlexGrid.Col = 1
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 2
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 3
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 4
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 5
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 6
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 7
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 8
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 9
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 10
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.TextMatrix(i, 4) = Format(CDate(rec(4)), "hh:nn:ss") 'mulai
            If rec(2) = "personal" Then
                MSFlexGrid.TextMatrix(i, 7) = setPersonal 'jenis
            ElseIf rec(2) = "pelajar" Then
            MSFlexGrid.TextMatrix(i, 7) = setPelajar
            ElseIf rec(2) = "member" Then
            MSFlexGrid.TextMatrix(i, 7) = setMember 'jenis
            ElseIf rec(2) = "payfirst" Then
            MSFlexGrid.TextMatrix(i, 7) = setPayFirst 'jenis
            ElseIf rec(2) = "game" Then
                MSFlexGrid.TextMatrix(i, 7) = setGame 'jenis
            ElseIf rec(2) = "ketik" Then
                MSFlexGrid.TextMatrix(i, 7) = setKetik 'jenis
                ElseIf rec(2) = "Operator" Then
                MSFlexGrid.TextMatrix(i, 7) = "Operator"
            End If
             MSFlexGrid.TextMatrix(i, 9) = rec(5)
             rec.Close
        Else
            MSFlexGrid.TextMatrix(i, 1) = setClient & i 'no client
            MSFlexGrid.Col = 1
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H0&
            MSFlexGrid.Col = 2
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H0&
            MSFlexGrid.TextMatrix(i, 2) = "" ' use
            MSFlexGrid.Col = 3
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H0&
            MSFlexGrid.Col = 4
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H0&
            MSFlexGrid.Col = 5
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H0&
            MSFlexGrid.Col = 6
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H0&
            MSFlexGrid.Col = 7
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H0&
            MSFlexGrid.Col = 8
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H0&
            MSFlexGrid.Col = 9
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H0&
            MSFlexGrid.Col = 10
            MSFlexGrid.Row = i
            MSFlexGrid.CellBackColor = &H0&
            MSFlexGrid.TextMatrix(i, 3) = setBebas 'status
            MSFlexGrid.TextMatrix(i, 4) = "" 'mulai
            MSFlexGrid.TextMatrix(i, 5) = "" 'durasi
            MSFlexGrid.TextMatrix(i, 6) = "" 'biaya
            MSFlexGrid.TextMatrix(i, 7) = "" 'jenis
            MSFlexGrid.TextMatrix(i, 8) = "" 'discount
            MSFlexGrid.TextMatrix(i, 9) = "No" 'Print
            MSFlexGrid.TextMatrix(i, 10) = "" 'total
            rec.Close
        End If
       
    Next i
IfNoErr:
Exit Sub
hell:
 'MsgBox "An Error In " & Me.Name & ". See Error.log for detail", vbCritical, "Error Handling"
 TulisError Err.Description, Err.Number, "CekTemp", Me.Name
Resume IfNoErr

End Sub
Private Sub CekPortSet()
On Error GoTo hell
 rec.Open "SELECT alamat.* FROM alamat", conn, adOpenStatic, adLockOptimistic
    If rec.RecordCount = 0 Then
        port = 2807
        Winsock(0).LocalPort = port
        Winsock(0).Listen
        iSockets = 1
        iSocketsFree(iSockets) = True
        rec.Close
        Else
        rec.MoveFirst
        port = rec(3)
        Winsock(0).LocalPort = port
        Winsock(0).Listen
        iSockets = 1
        iSocketsFree(iSockets) = True
        rec.Close
    End If
    
IfNoErr:
Exit Sub
hell:
 'MsgBox "An Error In " & Me.Name & ". See Error.log for detail", vbCritical, "Error Handling"
 TulisError Err.Description, Err.Number, "CekTemp", Me.Name
Resume IfNoErr
End Sub

Private Sub CekSetingUmum()
'On Error GoTo hell
    rec.Open "SELECT alamat.* FROM alamat", conn, adOpenStatic, adLockOptimistic
    If Not rec.RecordCount = 0 Then
        rec.MoveFirst
        Txtnama_warnet.Caption = rec(0)
        nama_warnet = rec(0)
        Txtalamat1.Caption = rec(1)
        alamat1 = rec(1)
        Txtalamat2.Caption = rec(2)
        alamat2 = rec(2)
        mata_uang = rec(4)
       awal_personal = rec(5)
       awal_pelajar = rec(6)
       awal_member = rec(7)
       awal_game = rec(8)
       awal_ketik = rec(9)
       settingharga = rec(10)
       chkawal.Caption = settingharga
       actbil = rec(11)
       slogan = rec(12)
        rec.Close
    Else
        rec.Close
        Call HapusdbIP
        Txtnama_warnet.Caption = "BLacK PeaRL Internet Cafe"
        Txtalamat1.Caption = "Jl. Cyber World Wide Web"
        Txtalamat2.Caption = "BLacK PeaRL Cyber Community TM"
        nama_warnet = Txtnama_warnet.Caption
        alamat1 = Txtalamat1.Caption
        alamat2 = Txtalamat2.Caption
        mata_uang = "Rp"

         
    End If
'IfNoErr:
'Exit Sub
'hell:
' TulisError Err.Description, Err.Number, "CekSetingUmum", Me.Name
' Resume IfNoErr
End Sub
Private Sub CekSetingHarga()
On Error GoTo hell
    rec.Open "SELECT globset.* FROM globset", conn, adOpenStatic, adLockOptimistic
    If Not rec.RecordCount = 0 Then
        rec.MoveFirst
        harga_personal = rec(1)
        harga_pelajar = rec(2)
        harga_member = rec(3)
        harga_game = rec(4)
        harga_ketik = rec(5)
        interval = rec(6)
        intervalpel = rec(7)
        intervalmem = rec(8)
        intervalgam = rec(9)
        intervalmen = rec(10)
        deposit_min = rec(11)
        jed = rec(12)
        rec.Close
        txtjeda.Text = jed
    Else
        harga_personal = 4000
        harga_member = 3000
        harga_game = 5000
        harga_ketik = 2500
        harga_pelajar = 3000
        interval = 15
        deposit_min = 5000
        jed = 0
        rec.Close
         txtjeda.Text = jed
    End If
IfNoErr:
Exit Sub
hell:
 TulisError Err.Description, Err.Number, "CekSetingUmum", Me.Name
 Resume IfNoErr
End Sub
Private Sub CekSetingDiscount()
    rec.Open "SELECT happyhours.* FROM happyhours", conn, adOpenStatic, adLockOptimistic
    If Not rec.RecordCount = 0 Then
        rec.MoveFirst
        Discount = rec(0)
        jam_awal = rec(1)
        jam_akhir = rec(2)
         rec.Close
    Else
        Discount = 0
        jam_awal = "2300"
        jam_akhir = "0600"
        rec.Close
    End If
    
End Sub




Private Sub TreeOP_NodeClick(ByVal Node As MSComctlLib.Node)
If Node.Key = "Main" Then
FrmMain.Visible = True
ElseIf Node.Key = "Konfig" Then
Call Label14_Click
ElseIf Node.Key = "DaftarUser" Then
Call cmdpendaftaranuser_Click
ElseIf Node.Key = "BackUp" Then
Call Label16_Click
ElseIf Node.Key = "Penjualan" Then
Call Cmdjual_Click
ElseIf Node.Key = "DaftarMember" Then
Call Label10_Click
ElseIf Node.Key = "DaftarPayFirst" Then
Call MnuPayFirst_Click
ElseIf Node.Key = "Tamsal" Then
Call Label9_Click
ElseIf Node.Key = "Sisal" Then
Call Label12_Click
ElseIf Node.Key = "SetPas" Then
Call mnupassadmin_Click
ElseIf Node.Key = "Pes" Then
Call mnupesan_Click
ElseIf Node.Key = "StopCli" Then
Call mnustop_Click
ElseIf Node.Key = "PinCli" Then
Call mnupindah_Click
ElseIf Node.Key = "ShutCli" Then
Call mnushutdown_Click
ElseIf Node.Key = "Lis" Then
Load FrmStatus
FrmStatus.Show 1
ElseIf Node.Key = "ActiveP" Then
Call as_Click
ElseIf Node.Key = "DeactiveP" Then
Call asss_Click
ElseIf Node.Key = "LockCli" Then
Call mnuactiv_Click
ElseIf Node.Key = "ULockCli" Then
Call mnuunlock_Click
ElseIf Node.Key = "Taskman" Then
Call mnutask1_Click
ElseIf Node.Key = "RemoD" Then
Call Label5_Click
ElseIf Node.Key = "Edt" Then
Call Label13_Click
ElseIf Node.Key = "LapBil" Then
Call cmdlaporanbilling_Click
ElseIf Node.Key = "LapBilPen" Then
Call cmdlaporanpenjualan_Click
ElseIf Node.Key = "LockBil" Then
Call locks_Click
ElseIf Node.Key = "Fix" Then
Call MnuFix_Click
ElseIf Node.Key = "LogOuts" Then
Call shut_Click
ElseIf Node.Key = "RegDef" Then
Call MnuDefense_Click
ElseIf Node.Key = "Laucn" Then
Call Label18_Click
ElseIf Node.Key = "med" Then
Call cmdMp3_Click
ElseIf Node.Key = "Style" Then
Call cmdstyle_Click
ElseIf Node.Key = "Spac" Then
Call cmdSpaceImpact_Click
ElseIf Node.Key = "reg" Then
Call mnureg_Click
ElseIf Node.Key = "Space" Then
Call help_Click
ElseIf Node.Key = "about" Then
Call mnuabout_Click
End If
End Sub

Private Sub Winsock_Close(Index As Integer)
'On Error GoTo hell
rec.Open "select port.* FROM port WHERE port.port = '" & Index & "'", conn, adOpenStatic, adLockOptimistic
    Winsock(Index).Close
    If Not rec.RecordCount = 0 Then
       rec.Delete
       rec.Close
       Else
       rec.Close
    End If
    
    iSocketsFree(Index) = True
    iSockets = Index
    Unload Winsock(Index)
    If iSockets > SockMax Then
        Unload Me
    End If
    If chksound.value = 1 Then
    X = sndPlaySound(App.path & "\sound\Disconnected.wav", wFlags)
    End If
'IfNoErr:
'Exit Sub
'hell:
'TulisError Err.Description, Err.Number, "WinSock_Close", Me.Name
' Resume IfNoErr

End Sub

Private Sub Winsock_ConnectionRequest(Index As Integer, ByVal requestID As Long)
'On Error GoTo hell
    Dim ip_client As String
    Dim sockload As Boolean
    sockload = False
  
    Do While sockload = False
        If iSocketsFree(iSockets) = True Then
        On Error Resume Next
            Load Winsock(iSockets)
             Winsock(iSockets).LocalPort = port
            Winsock(iSockets).Accept requestID
            ip_client = Winsock(iSockets).RemoteHostIP


            'tulis port dalam db
            rec.Open "SELECT port.* FROM port WHERE port.ip = '" & ip_client & "'", conn, adOpenStatic, adLockOptimistic
            If rec.RecordCount = 0 Then
             rec.AddNew
                rec(0) = ip_client
                rec(1) = iSockets 'port
                rec.Update
                rec.Close
                
            Else
                rec(1) = iSockets 'port
                rec.Update
                rec.Close
            End If

            iSocketsFree(iSockets) = False
            sockload = True
            
            Exit Do
        Else
            If LBound(iSocketsFree()) > iSockets Then
                If iSocketsFree(iSockets) = False Then
                    iSockets = iSockets + 1
                End If
            Else
                iSockets = iSockets + 1
                iSocketsFree(iSockets) = True
                Exit Do
            End If
      
        End If
    Loop
 
'IfNoErr:
'Exit Sub
'hell:
'If Err.Number = 380 Then
'On Error Resume Next
'ElseIf Err.Number = 360 Then
'Unload Winsock(iSockets)
'Else
'On Error Resume Next
'End If
'TulisError Err.Description, Err.Number, "WinSock_ConnectionRequest", Me.Name
' Resume IfNoErr

End Sub

Private Sub Winsock_DataArrival(Index As Integer, ByVal bytesTotal As Long)
'On Error GoTo hell
Dim str As String
    Dim sub_str() As String
    Dim perintah As String
    Dim ip As String
    Dim op1 As String
    Dim op2 As String
    Dim op3 As String
    Dim op4 As String
    Dim op5 As String
    Dim op6 As String
    Dim op7 As String
    Dim op8 As String
    Dim op9 As String
    Dim op10 As String
    Dim op11 As String
    Dim op12 As String
    Dim op13 As String
    Dim op14 As String
    Dim op15 As String
    Dim op16 As String
    Dim op17 As String
    Dim op18 As String
    Dim op19 As String
    Dim op20 As String
    Dim op21 As String
    Dim op22 As String
    Dim op23 As String
    Dim op24 As String
    Dim op25 As String
    Dim op26 As String
    Dim op27 As String
    Dim op28 As String
    Dim No_Client As Integer
    'error 40006
    On Error Resume Next
    Winsock(Index).GetData str
    sub_str() = Split(str, "|")
    If UBound(sub_str) >= 0 Then
        perintah = sub_str(0)
    End If
    If UBound(sub_str) >= 1 Then
        ip = sub_str(1)
    End If
    If UBound(sub_str) >= 2 Then
        op1 = sub_str(2)
    End If
    If UBound(sub_str) >= 3 Then
        op2 = sub_str(3)
    End If
    If UBound(sub_str) >= 4 Then
        op3 = sub_str(4)
    End If
        If UBound(sub_str) >= 5 Then
        op4 = sub_str(5)
    End If
If UBound(sub_str) >= 6 Then
        op5 = sub_str(6)
    End If
    If UBound(sub_str) >= 7 Then
        op6 = sub_str(7)
    End If
    If UBound(sub_str) >= 8 Then
        op7 = sub_str(8)
    End If
    If UBound(sub_str) >= 9 Then
        op8 = sub_str(9)
    End If
    If UBound(sub_str) >= 10 Then
        op9 = sub_str(10)
    End If
    If UBound(sub_str) >= 11 Then
        op10 = sub_str(11)
    End If
    If UBound(sub_str) >= 12 Then
        op11 = sub_str(12)
    End If
    If UBound(sub_str) >= 13 Then
        op12 = sub_str(13)
    End If
    If UBound(sub_str) >= 14 Then
        op13 = sub_str(14)
    End If
    If UBound(sub_str) >= 15 Then
        op14 = sub_str(15)
    End If
    If UBound(sub_str) >= 16 Then
        op15 = sub_str(16)
    End If
        If UBound(sub_str) >= 17 Then
        op16 = sub_str(17)
    End If
    If UBound(sub_str) >= 18 Then
        op17 = sub_str(18)
    End If
    If UBound(sub_str) >= 19 Then
        op18 = sub_str(19)
    End If
            If UBound(sub_str) >= 20 Then
        op19 = sub_str(20)
    End If

        If UBound(sub_str) >= 21 Then
        op20 = sub_str(21)
    End If
    If UBound(sub_str) >= 22 Then
        op21 = sub_str(22)
    End If
    If UBound(sub_str) >= 23 Then
        op22 = sub_str(23)
    End If
    If UBound(sub_str) >= 24 Then
        op23 = sub_str(24)
    End If
    If UBound(sub_str) >= 25 Then
        op24 = sub_str(25)
    End If
    If UBound(sub_str) >= 26 Then
        op25 = sub_str(26)
    End If
    If UBound(sub_str) >= 27 Then
        op26 = sub_str(27)
    End If
    If UBound(sub_str) >= 28 Then
        op27 = sub_str(28)
    End If

    If perintah = "registering" Then
        rec.Open "SELECT ip.* FROM ip WHERE ip.ip = '" & ip & "' OR ip.no_client = " & Val(op1), conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
            Winsock(Index).SendData "Nomor client telah terpakai|_|_|_|_|_|_|"
            rec.Close
        Else
            Winsock(Index).SendData "registered|_|_|_|_|_|_|"
            rec.AddNew
            rec(0) = Val(op1)
            rec(1) = ip
            rec.Update
            rec.Close
        End If
       
    ElseIf perintah = "clientstatus" Then
        rec.Open "SELECT ip.* FROM ip WHERE ip.ip = '" & ip & "'", conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
            No_Client = rec(0)
        If MSFlexGrid.TextMatrix(rec(0), 3) = setBebas Then
        Winsock(Index).SendData "availabled" & "|_|_|_|_|_|_"
         rec.Close
        ElseIf MSFlexGrid.TextMatrix(rec(0), 3) = setAktif Then
        rec.Close
                
                rec.Open "SELECT aktifitas.* FROM aktifitas WHERE aktifitas.no_client = " & No_Client, conn, adOpenStatic, adLockOptimistic
                If Not rec.RecordCount = 0 Then
                    Winsock(Index).SendData "notavailable|" & rec(6) & "|" & rec(2) & "|" & rec(3) & "|" & rec(4)
                    rec.Close
                Else
                    MSFlexGrid.TextMatrix(rec(0), 3) = setBebas
                    rec.Close
                End If
            End If
        Else
            Winsock(Index).SendData "client belum terdaftar|_|_|_|_|_|_|"
            rec.Close
        End If
        
        ElseIf perintah = "connecting" Then
        rec.Open "SELECT ip.* FROM ip WHERE ip.ip = '" & ip & "'", conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
        No_Client = rec(0)
        Winsock(Index).SendData "settime|" & Format(Time, "hh:nn:ss AM/PM") & "|" & Date & "|" & No_Client & "|" & nama_warnet & "|" & alamat1 & "|" & alamat2 & "|" & settingharga & "|" & password_admin & "|" & actbil & "|" & slogan & "|" & FrmDatabases.txtdatabases.Text & "|" & FrmDatabases.txtlokda.Text & "|" & FrmDatabases.txtport.Text & "|" & FrmDatabases.txtnameda.Text & "|" & FrmDatabases.TxtUser.Text & "|" & FrmDatabases.txtpass.Text & "|" & jed
        rec.Close
        Else
        Winsock(Index).SendData "client belum terdaftar|_|_|_|_|_|_|"
        rec.Close
        End If
        
        ElseIf perintah = "costset" Then
        rec.Open "SELECT ip.* FROM ip WHERE ip.ip = '" & ip & "'", conn, adOpenStatic, adLockOptimistic
        No_Client = rec(0)
        If Not rec.RecordCount = 0 Then
        Winsock(Index).SendData "costsets|" & interval & "|" & intervalpel & "|" & intervalmem & "|" & intervalgam & "|" & intervalmen & "|" & Discount & "|" & jam_awal & "|" & jam_akhir & "|" & harga_personal & "|" & harga_pelajar & "|" & harga_member & "|" & harga_game & "|" & harga_ketik & "|" & awal_personal & "|" & awal_pelajar & "|" & awal_member & "|" & awal_game & "|" & awal_ketik & "|" & Format(Time, "hh:nn:ss AM/PM") & "|" & Date & "|" & No_Client & "|" & nama_warnet & "|" & alamat1 & "|" & alamat2 & "|" & settingharga & "|" & password_admin & "|" & actbil & "|" & slogan
        rec.Close
        Else
        Winsock(Index).SendData "client belum terdaftar|_|_|_|_|_|_|"
        rec.Close
        End If


        ElseIf perintah = "starting" Then
        timeinclient = op3
        rec.Open "SELECT ip.* FROM ip WHERE ip.ip = '" & ip & "'", conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
            No_Client = rec(0)
            MSFlexGrid.TextMatrix(rec(0), 3) = "start"
            MSFlexGrid.TextMatrix(rec(0), 2) = op1
            If op2 = "personal" Then
            MSFlexGrid.TextMatrix(rec(0), 7) = setPersonal
            ElseIf op2 = "pelajar" Then
            MSFlexGrid.TextMatrix(rec(0), 7) = setPelajar
            ElseIf op2 = "member" Then
            MSFlexGrid.TextMatrix(rec(0), 7) = setMember
            ElseIf op2 = "payfirst" Then
            MSFlexGrid.TextMatrix(rec(0), 7) = setPayFirst
            ElseIf op2 = "game" Then
            MSFlexGrid.TextMatrix(rec(0), 7) = setGame
            ElseIf op2 = "ketik" Then
            MSFlexGrid.TextMatrix(rec(0), 7) = setKetik
            ElseIf op2 = "operator" Then
            MSFlexGrid.TextMatrix(rec(0), 7) = "Operator"
            End If
            MSFlexGrid.TextMatrix(rec(0), 9) = "No"
            mulai(No_Client) = Now
            Winsock(Index).SendData "accept|_|_|_|_|_|_|"
            MSFlexGrid.Col = 3
            MSFlexGrid.Row = rec(0)
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 2
            MSFlexGrid.Row = rec(0)
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 1
            MSFlexGrid.Row = rec(0)
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 4
            MSFlexGrid.Row = rec(0)
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 5
            MSFlexGrid.Row = rec(0)
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 6
            MSFlexGrid.Row = rec(0)
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 7
            MSFlexGrid.Row = rec(0)
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 8
            MSFlexGrid.Row = rec(0)
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 9
            MSFlexGrid.Row = rec(0)
            MSFlexGrid.CellBackColor = &H8000&
            MSFlexGrid.Col = 10
            MSFlexGrid.Row = rec(0)
            MSFlexGrid.CellBackColor = &H8000&         'hijau
           
            With FrmPopup
            On Error Resume Next
               .lbl.Caption = "Client Connected"
               .lbl1.Caption = "Connected " & op1 & " " & vbCrLf & "Please check conectivity!!!"
               .Visible = True
                End With
            rec.Close
            Call startcl
        Else
            Winsock(Index).SendData "client belum terdaftar|_|_|_|_|_|_|"
            rec.Close
        End If
        
    ElseIf perintah = "stoping" Then
    Unload FrmPopup
        rec.Open "SELECT ip.* FROM ip WHERE ip.ip = '" & ip & "'", conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
            If MSFlexGrid.TextMatrix(Val(rec(0)), 3) = "Connected" Then
                No_Client = rec(0)
                MSFlexGrid.Col = 1
                MSFlexGrid.Row = rec(0)
                MSFlexGrid.CellBackColor = &HC0&
                MSFlexGrid.Col = 2
                MSFlexGrid.Row = rec(0)
                MSFlexGrid.CellBackColor = &HC0&
                MSFlexGrid.TextMatrix(rec(0), 3) = "stop"
                MSFlexGrid.Col = 3
                MSFlexGrid.Row = rec(0)
                MSFlexGrid.CellBackColor = &HC0&
                MSFlexGrid.Col = 4
                MSFlexGrid.Row = rec(0)
                MSFlexGrid.CellBackColor = &HC0&
                MSFlexGrid.Col = 5
                MSFlexGrid.Row = rec(0)
                MSFlexGrid.CellBackColor = &HC0&
                MSFlexGrid.Col = 6
                MSFlexGrid.Row = rec(0)
                MSFlexGrid.CellBackColor = &HC0&
                MSFlexGrid.Col = 7
                MSFlexGrid.Row = rec(0)
                MSFlexGrid.CellBackColor = &HC0&
                MSFlexGrid.Col = 8
                MSFlexGrid.Row = rec(0)
                MSFlexGrid.CellBackColor = &HC0&
                MSFlexGrid.Col = 9
                MSFlexGrid.Row = rec(0)
                MSFlexGrid.CellBackColor = &HC0&
                MSFlexGrid.Col = 10
                MSFlexGrid.Row = rec(0)
                MSFlexGrid.CellBackColor = &HC0&
                Winsock(Index).SendData "accept|_|_|_|_|_|_|"
                txtnoclient.Text = No_Client
                With FrmPopup
                On Error Resume Next
               .lbl.Caption = "Client Disconnected"
               .lbl1.Caption = "Workstation " & txtnoclient.Text & "  Disconnect" & vbCrLf & "Please check conectivity!!!"
               .Visible = True
                End With
                
            End If
            rec.Close
            Call stopcl
        Else
            Winsock(Index).SendData "client belum terdaftar|_|_|_|_|_|_|"
            rec.Close
        End If
'            ElseIf perintah = "print" Then
'        rec.Open "SELECT ip.* FROM ip WHERE ip.ip = '" & ip & "'", conn, adOpenStatic, adLockOptimistic
'        If Not rec.RecordCount = 0 Then
'            No_Client = rec(0)
'            MSFlexGrid.TextMatrix(rec(0), 9) = "Yes"
'        Else
'            MSFlexGrid.TextMatrix(rec(0), 9) = "No"
'        End If
'       rec.Close

    ElseIf perintah = "passwordmem" Then
 
        rec.Open "SELECT member.* FROM member WHERE member.user = '" & op1 & "'", conn, adOpenStatic, adLockOptimistic
        'cek status
        
        If rec.RecordCount = 0 Then
              Winsock(Index).SendData "nama member belum terdaftar|_|_|_|_|_|_|"
            rec.Close
            Else
            If rec(5) >= deposit_min And rec(6) = "not active" Then
                Winsock(Index).SendData "passwordmem|" & DecryptText(rec(4), "password") & "|accept|" & rec(5) & "|" & deposit_min & "|" & rec(8)
                rec(6) = "aktif"
                rec(7) = op2
                rec.Update
  
              rec.Close
            ElseIf rec(6) = "aktif" And rec(7) = op2 Then
                Winsock(Index).SendData "passwordmem|" & DecryptText(rec(4), "password") & "|accept|" & rec(5) & "|" & deposit_min & "|" & rec(8)
                rec(6) = "aktif"
                rec(7) = op2
                rec.Update
              rec.Close
            Else
                Winsock(Index).SendData "passwordmem|" & rec(4) & "|no|_|_|_|_|"
                rec.Close
            End If
        End If
     

    ElseIf perintah = "passwordpay" Then
        rec.Open "SELECT prepaid.* FROM prepaid WHERE prepaid.user = '" & op1 & "'", conn, adOpenStatic, adLockOptimistic
        If rec.RecordCount = 0 Then
            Winsock(Index).SendData "nama member belum terdaftar|_|_|_|_|_|_|"
            rec.Close
              Else
        If Format(Now, "hhmm") >= Val(rec(10)) And Format(Now, "hhmm") < Val(rec(11)) Then
            If rec(3) >= 0 And rec(6) = "not active" Then
                Winsock(Index).SendData "passwordpay|" & DecryptText(rec(4), "password") & "|accept|" & rec(5) & "|" & rec(3) & "|" & rec(9) & "|" & rec(12)
                rec(6) = "aktif"
                rec(7) = op2
                rec.Update
                rec.Close
                ElseIf rec(6) = "aktif" And rec(7) = op2 Then
                Winsock(Index).SendData "passwordpay|" & DecryptText(rec(4), "password") & "|accept|" & rec(5) & "|" & rec(3) & "|" & rec(9) & "|" & rec(12)
                rec(6) = "aktif"
                rec(7) = op2
                rec.Update
                rec.Close
                ElseIf rec(8) = "Tetap" Then
                Winsock(Index).SendData "passwordpay|" & DecryptText(rec(4), "password") & "|accept|" & rec(5) & "|" & rec(3) & "|" & rec(9) & "|" & rec(12)
                rec(6) = "aktif"
                rec(7) = op2
                rec.Update
                rec.Close

            End If
        Else
        Winsock(Index).SendData "passwordpay|" & rec(4) & "|no|_|_|_|_|"
        rec.Close
        End If
        End If
        
            ElseIf perintah = "cancelmem" Then
            
        rec.Open "SELECT member.* FROM member WHERE member.user = '" & op1 & "' ", conn, adOpenStatic, adLockOptimistic
        If rec.RecordCount = 0 Then
         Winsock(Index).SendData "nama member belum terdaftar|_|_|_|_|_|_|"
            rec.Close
            Else
              rec(6) = "not active"
              rec.Update
              rec.Close
        End If

        ElseIf perintah = "memact" Then
        rec.Open "SELECT member.* FROM member WHERE member.user = '" & op1 & "'", conn, adOpenStatic, adLockOptimistic
        If rec.RecordCount = 0 Then
            Winsock(Index).SendData "nama member belum terdaftar|_|_|_|_|_|_|"
            rec.Close
            
            Else
              rec(6) = "aktif"
              rec(7) = op2
              rec.Update
              rec.Close
        End If

        ElseIf perintah = "payact" Then
        rec.Open "SELECT prepaid.* FROM prepaid WHERE prepaid.user = '" & op1 & "'", conn, adOpenStatic, adLockOptimistic
        If rec.RecordCount = 0 Then
                    Winsock(Index).SendData "nama member belum terdaftar|_|_|_|_|_|_|"
            rec.Close
            Else
              rec(6) = "aktif"
              rec(7) = op2
              rec.Update
              rec.Close


        End If
        ElseIf perintah = "cancelpay" Then
        rec.Open "SELECT prepaid.* FROM prepaid WHERE prepaid.user = '" & op1 & "'", conn, adOpenStatic, adLockOptimistic
        If rec.RecordCount = 0 Then
            Winsock(Index).SendData "nama member belum terdaftar|_|_|_|_|_|_|"
            rec.Close
            Else
                rec(6) = "not active"
                rec.Update
                rec.Close
        End If

    ElseIf perintah = "loginop" Then
        rec.Open "SELECT useraccount.* FROM useraccount WHERE useraccount.username = '" & op1 & "'", conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
            If Val(rec(7)) >= 1 Then
                Winsock(Index).SendData "loginop|" & DecryptText(rec(5), "password") & "|accept|" & rec(7)
                rec.Close
            Else
                Winsock(Index).SendData "loginop|" & rec(5) & "|no|_|_|_|_|"
                rec.Close
            End If
        Else
            Winsock(Index).SendData "nama Operator belum terdaftar|_|_|_|_|_|_|"
            rec.Close
        End If


        ElseIf perintah = "taskman" Then
        rec.Open "SELECT ip.* FROM ip WHERE ip.ip = '" & ip & "'", conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
            No_Client = rec(0)
            remotestr1(No_Client) = op1
            remotestr2(No_Client) = op2
            Call ListProcess
            rec.Close
        Else
            Winsock(Index).SendData "client belum terdaftar|_|_|_|_|_|_|"
            rec.Close
        End If
        
        ElseIf perintah = "urlc" Then
        rec.Open "SELECT ip.* FROM ip WHERE ip.ip = '" & ip & "'", conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
            No_Client = rec(0)
            FrmUrl.lstURL.AddItem op2
        rec.Close
        Else
            Winsock(Index).SendData "client belum terdaftar|_|_|_|_|_|_|"
            rec.Close
        End If

        ElseIf perintah = "memblank" Then
        rec.Open "select member.* from member where member.ws='" & op1 & "'", conn, adOpenStatic, adLockOptimistic
        If rec.RecordCount = 0 Then
        rec.Close
        Else
        rec(6) = "not active"
        rec.Update
        rec.Close
        End If
        
        With FrmPopup
        .lbl.Caption = "Lost Connection"
        .lbl1.Caption = "Beritahu member untuk menkonfirmasi password."
        .Visible = True
        End With
        
        ElseIf perintah = "payblank" Then
        rec.Open "select prepaid.* from prepaid where prepaid.ws='" & op1 & "'", conn, adOpenStatic, adLockOptimistic
        If rec.RecordCount = 0 Then
        rec.Close
        Else
        rec(6) = "not active"
        rec.Update
        rec.Close
        End If
        
        With FrmPopup
        .lbl.Caption = "Lost Connection"
        .lbl1.Caption = "Beritahu member untuk menkonfirmasi password"
        .Visible = True
        End With
        
        
    ElseIf perintah = "illegf" Then
MsgBox "Program ilegal Terdeteksi di client : " & op1 & " : Nama Program : " & op2 & " : Program telah di blok dan di tutup.", vbCritical, "Detected"

 ElseIf perintah = "chkdisc" Then
     rec.Open "SELECT happyhours.* FROM happyhours", conn, adOpenStatic, adLockOptimistic
    If Not rec.RecordCount = 0 Then
        rec.MoveFirst
        Discount = rec(0)
        jam_awal = rec(1)
        jam_akhir = rec(2)
        discok = rec(0)
        Winsock(Index).SendData "chkdiscok|" & discok
         rec.Close
    Else
        Discount = 0
        jam_awal = "2300"
        jam_akhir = "0600"
        rec.Close
    End If

 
    ElseIf perintah = "checkdep" Then
    rec.Open "select member.* from member where member.user ='" & op1 & "'", conn, adOpenStatic, adLockOptimistic
    If rec.RecordCount = 0 Then
    rec.Close
    Else
    Winsock(Index).SendData "checkdepok|" & rec(5)
    rec.Close
    End If
    ElseIf perintah = "waktusek" Then
    Winsock(Index).SendData "waktuseka|" & Format(Now, "hhmm")

    ElseIf perintah = "pesan" Then
        rec.Open "SELECT ip.* FROM ip WHERE ip.ip = '" & ip & "'", conn, adOpenStatic, adLockOptimistic
        If Not rec.RecordCount = 0 Then
            No_Client = rec(0)
            rec.Close
            FrmPesan.txtnoclient.Text = No_Client
            If FrmPesanLoad = False Then
            
                Load FrmPesan
                'If FExists("psn.blc") Then
                 '   FrmPesan.TxtpesanDiterima.LoadFile ("psn.blc")
                'End If
                On Error Resume Next
                FrmPesan.Visible = True
            End If
                FrmPesan.TxtpesanDiterima.AddItem "Client " & No_Client & ": " & op1
                
                'FrmPesan.TxtpesanDiterima.SaveFile ("psn.blc")
            
        Else
            Winsock(Index).SendData "client belum terdaftar|_|_|_|_|_|_|"
            rec.Close
        End If
        
        With FrmPopup
        .lbl.Caption = "New Messages"
        .lbl1.Caption = "You have received new messages from Client: " & No_Client & " " & vbNewLine & vbNewLine & "Pesan:" & op1 & ""
        .Visible = True
        End With
         If chksound.value = 1 Then
        X = sndPlaySound(App.path & "\sound\pesan.wav", wFlags)
        End If
    End If
'IfNoErr:
'Exit Sub
'hell:
'
' TulisError Err.Description, Err.Number, "Winsock_DataArrival", Me.Name
' Resume IfNoErr

End Sub
Private Sub CekPasswordAdmin()
'On Error GoTo hell
    rec.Open "SELECT root.* FROM root", conn, adOpenStatic, adLockOptimistic
    If Not rec.RecordCount = 0 Then
        rec.MoveFirst
        password_admin = DecryptText(rec(0), "password")
        rec.Close
    Else
        password_admin = "root"
        rec.Close
    End If

'IfNoErr:
'Exit Sub
'hell:
' 'MsgBox "An Error In " & Me.Name & ". See Error.log for detail", vbCritical, "Error Handling"
' TulisError Err.Description, Err.Number, "CekPasswordAdmin", Me.Name
' Resume IfNoErr

End Sub
Private Sub HapusdbSocket()
'On Error GoTo hell
   rec.Open "Delete port.* FROM port", conn, adOpenStatic, adLockOptimistic
'IfNoErr:
'Exit Sub
'hell:
'If Err.Number = 3705 Then
'rec.Close
'ElseIf Err.Number = 3704 Then
'rec.Open "SELECT port.* FROM port", conn, adOpenStatic, adLockOptimistic
'Else
' 'MsgBox "An Error In " & Me.Name & ". See Error.log for detail", vbCritical, "Error Handling"
' TulisError Err.Description, Err.Number, "HapusSocket", Me.Name
' Resume IfNoErr
'End If

End Sub
Private Sub HapusdbIP()
'On Error GoTo hell
        rec.Open "Delete ip.* FROM ip", conn, adOpenStatic, adLockOptimistic
       
'IfNoErr:
'Exit Sub
'hell:
'If Err.Number = 3705 Then
'rec.Close
'ElseIf Err.Number = 3704 Then
'rec.Open "SELECT ip.* FROM ip", conn, adOpenStatic, adLockOptimistic
'Else
' 'MsgBox "An Error In " & Me.Name & ". See Error.log for detail", vbCritical, "Error Handling"
' TulisError Err.Description, Err.Number, "HapusIP", Me.Name
' Resume IfNoErr
'End If

End Sub
Private Sub locks_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lock2.Visible = True
lock1.Visible = False
End Sub
Private Sub locks_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lock1.Visible = True
shut1.Visible = False
shut2.Visible = False
normal.Visible = False
menu.Visible = False
Call movof
locks.ToolTipText = "Kunci billing sehingga user tidak bisa mengakses billing ini"
End Sub
Private Sub locks_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
normal.Visible = True
lock1.Visible = False
lock2.Visible = False
End Sub

Private Sub menus_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
menu.Visible = True
lock1.Visible = False
normal.Visible = False
shut1.Visible = False
Call movof
menus.ToolTipText = "Explore My Billing"
End Sub

Private Sub shut_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
shut2.Visible = True
shut1.Visible = False
End Sub
Private Sub shut_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
imghov.Visible = False
shut1.Visible = True
menu.Visible = False
lock1.Visible = False
lock2.Visible = False
normal.Visible = False
shut.ToolTipText = "Tukar Operator/user"
End Sub
Private Sub shut_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
normal.Visible = True
shut2.Visible = False
shut2.Visible = False
End Sub

Public Sub movof()
imghov.Visible = False
imghov2.Visible = False
imghov3.Visible = False
imghov4.Visible = False
imghov5.Visible = False
imghov6.Visible = False
imghov7.Visible = False
imghov8.Visible = False
imghov9.Visible = False
imghov10.Visible = False
imghov11.Visible = False
imghov12.Visible = False
End Sub
Public Sub stdef()
Dim ctrl As Control
For Each ctrl In Controls
    If (TypeOf ctrl Is ButtonNix) And _
        ctrl.Name <> "cmdSwitchStyle" Then
        ctrl.ButtonType = 5 - Index
        ctrl.ColorScheme = 2
    End If
        If (TypeOf ctrl Is BLacKFrame) And _
        ctrl.Name <> "cmdSwitchStyle" Then
        ctrl.BackColor1 = vbBlack
      ctrl.TitleColor1 = &H272727
      ctrl.BorderColor = vbWhite
      ImgLogo.Visible = True
         FrmMain.Backcolor = vbBlack
         FrmMain.Txtnama_warnet.Forecolor = vbWhite
         FrmMain.Txtalamat1.Forecolor = vbWhite
         FrmMain.Txtalamat2.Forecolor = vbWhite
         FrmMain.MSFlexGrid.Backcolor = &H0&
         FrmMain.MSFlexGrid.BackColorBkg = &H0&
         FrmMain.MSFlexGrid.BackColorSel = &HFF0000
         FrmMain.MSFlexGrid.ForeColorSel = &HFF&
         BLacKFrame2.BackColor1 = &H272727
    End If

Next ctrl

End Sub
Public Sub stwhite()
Dim ctrl As Control
For Each ctrl In Controls
    If (TypeOf ctrl Is ButtonNix) And _
        ctrl.Name <> "cmdSwitchStyle" Then
        ctrl.ButtonType = 3 - Index
        ctrl.ColorScheme = 1
    End If
        If (TypeOf ctrl Is BLacKFrame) And _
        ctrl.Name <> "cmdSwitchStyle" Then
        ctrl.BackColor1 = vbWhite
         ctrl.TitleColor1 = vbWhite
         ctrl.BorderColor = vbBlack
         ImgLogo.Visible = False
         FrmMain.Backcolor = vbWhite
         FrmMain.Txtnama_warnet.Forecolor = vbBlack
         FrmMain.Txtalamat1.Forecolor = vbBlack
         FrmMain.Txtalamat2.Forecolor = vbBlack
         FrmMain.MSFlexGrid.Backcolor = vbWhite
         FrmMain.MSFlexGrid.BackColorBkg = &H8000&
         FrmMain.MSFlexGrid.BackColorSel = vbBlack
         FrmMain.MSFlexGrid.ForeColorSel = vbBlack
    End If

Next ctrl

End Sub

Private Sub ListProcess()
On Error GoTo hell
Dim substr_remote1() As String
Dim substr_remote2() As String
    substr_remote1() = Split(remotestr1(Val(FrmProc.txtnoclient.Text)), ":")
    substr_remote2() = Split(remotestr2(Val(FrmProc.txtnoclient.Text)), ":")
    If UBound(substr_remote1) > 1 Then
        FrmProc.Grid.Rows = UBound(substr_remote1) + 1
        FrmProc.Grid.TextMatrix(0, 0) = "Aplikasi"
        FrmProc.Grid.TextMatrix(0, 1) = "Proc Ident"
        FrmProc.Grid.ColWidth(0) = 2500
        FrmProc.Grid.ColWidth(1) = 1000
        For i = 0 To UBound(substr_remote1) - 1
            FrmProc.Grid.TextMatrix(i + 1, 0) = substr_remote1(i)
            FrmProc.Grid.TextMatrix(i + 1, 1) = substr_remote2(i)
        Next i
        FrmProc.LabelTotal.Caption = "Total Proses  " & UBound(substr_remote1) & ""
    Else
        FrmProc.Grid.Rows = 1
        FrmProc.Grid.TextMatrix(0, 0) = "Aplikasi"
        FrmProc.Grid.TextMatrix(0, 1) = "Proc Ident"
        FrmProc.Grid.ColWidth(0) = 2500
        FrmProc.Grid.ColWidth(1) = 1000
    End If
hell:
    If Err.Number = 9 Then
    On Error Resume Next
    End If
End Sub
Private Sub Init()
'On Error GoTo hell
    Dim total As Single
    TxtTgl.Text = Format(Date, "dd")
    If Format(Date, "mm") = "01" Then
        TxtBulan.Text = "Januari"
    ElseIf Format(Date, "mm") = "02" Then
        TxtBulan.Text = "Februari"
    ElseIf Format(Date, "mm") = "03" Then
        TxtBulan.Text = "Maret"
    ElseIf Format(Date, "mm") = "04" Then
        TxtBulan.Text = "April"
    ElseIf Format(Date, "mm") = "05" Then
        TxtBulan.Text = "Mei"
    ElseIf Format(Date, "mm") = "06" Then
        TxtBulan.Text = "Juni"
    ElseIf Format(Date, "mm") = "07" Then
        TxtBulan.Text = "Juli"
    ElseIf Format(Date, "mm") = "08" Then
        TxtBulan.Text = "Agustus"
    ElseIf Format(Date, "mm") = "09" Then
        TxtBulan.Text = "September"
    ElseIf Format(Date, "mm") = "10" Then
        TxtBulan.Text = "Oktober"
    ElseIf Format(Date, "mm") = "11" Then
        TxtBulan.Text = "November"
    ElseIf Format(Date, "mm") = "12" Then
        TxtBulan.Text = "Desember"
    End If
    TxtTahun.Text = Format(Date, "yyyy")
    GridStatusBayar.Cols = 11
    GridStatusBayar.ColWidth(0) = 500
    GridStatusBayar.ColWidth(1) = 1000
    GridStatusBayar.ColWidth(2) = 900
    GridStatusBayar.ColWidth(3) = 1100
    GridStatusBayar.ColWidth(4) = 1000
    GridStatusBayar.ColWidth(5) = 1000
    GridStatusBayar.ColWidth(6) = 1000
    GridStatusBayar.ColWidth(7) = 1000
    GridStatusBayar.ColWidth(8) = 1000
    GridStatusBayar.ColWidth(9) = 1500
    GridStatusBayar.ColWidth(10) = 800
    GridStatusBayar.TextMatrix(0, 0) = setNo
    GridStatusBayar.TextMatrix(0, 1) = setTanggal
    GridStatusBayar.TextMatrix(0, 2) = setClient
    GridStatusBayar.TextMatrix(0, 3) = setNamaUser
    GridStatusBayar.TextMatrix(0, 4) = setJenis
    GridStatusBayar.TextMatrix(0, 5) = setMulai
    GridStatusBayar.TextMatrix(0, 6) = setSelesai
    GridStatusBayar.TextMatrix(0, 7) = setDurasi
    GridStatusBayar.TextMatrix(0, 8) = setTotal
    GridStatusBayar.TextMatrix(0, 9) = "Status Bayar"
     GridStatusBayar.TextMatrix(0, 10) = "Belanja"
    total = 0
    rec.Open "SELECT status.* FROM status WHERE status.tanggal = '" & Format(Date, "dd-mm-yyyy") & "'", conn, adOpenStatic, adLockOptimistic
    If Not rec.RecordCount = 0 Then
        GridStatusBayar.Rows = rec.RecordCount + 1
        rec.MoveFirst
        For i = 1 To rec.RecordCount
     GridStatusBayar.TextMatrix(i, 0) = rec(0) 'no nota
            GridStatusBayar.TextMatrix(i, 1) = rec(1) ' tanggal
            GridStatusBayar.TextMatrix(i, 2) = rec(2)  ' no client
            GridStatusBayar.TextMatrix(i, 3) = rec(3) 'nama user
            GridStatusBayar.TextMatrix(i, 4) = rec(10) 'mulai
            GridStatusBayar.TextMatrix(i, 5) = rec(4) 'mulai
            GridStatusBayar.TextMatrix(i, 6) = rec(5) 'selesai
            GridStatusBayar.TextMatrix(i, 7) = rec(6) ' durasi
            GridStatusBayar.TextMatrix(i, 8) = rec(7) ' total
            GridStatusBayar.TextMatrix(i, 9) = rec(11)
            GridStatusBayar.TextMatrix(i, 10) = rec(12) ' durasi
            total = total + rec(7)
            rec.MoveNext
              
        Next i
       
    Else
        GridStatusBayar.Rows = 1
    End If
         rec.Close
'IfNoErr:
'Exit Sub
'hell:
' TulisError Err.Description, Err.Number, "Init", Me.Name
' Resume IfNoErr
End Sub

Private Sub tanggal()
TxtBulan.AddItem "Januari"
    TxtBulan.AddItem "Februari"
    TxtBulan.AddItem "Maret"
    TxtBulan.AddItem "April"
    TxtBulan.AddItem "Mei"
    TxtBulan.AddItem "Juni"
    TxtBulan.AddItem "Juli"
    TxtBulan.AddItem "Agustus"
    TxtBulan.AddItem "September"
    TxtBulan.AddItem "Oktober"
    TxtBulan.AddItem "November"
TxtBulan.AddItem "Desember"
TxtTgl.AddItem "01"
TxtTgl.AddItem "02"
TxtTgl.AddItem "03"
TxtTgl.AddItem "04"
TxtTgl.AddItem "05"
TxtTgl.AddItem "06"
TxtTgl.AddItem "07"
TxtTgl.AddItem "08"
TxtTgl.AddItem "09"
TxtTgl.AddItem "10"
TxtTgl.AddItem "11"
TxtTgl.AddItem "12"
TxtTgl.AddItem "13"
TxtTgl.AddItem "14"
TxtTgl.AddItem "15"
TxtTgl.AddItem "16"
TxtTgl.AddItem "17"
TxtTgl.AddItem "18"
TxtTgl.AddItem "19"
TxtTgl.AddItem "20"
TxtTgl.AddItem "21"
TxtTgl.AddItem "22"
TxtTgl.AddItem "23"
TxtTgl.AddItem "24"
TxtTgl.AddItem "25"
TxtTgl.AddItem "26"
TxtTgl.AddItem "27"
TxtTgl.AddItem "28"
TxtTgl.AddItem "29"
TxtTgl.AddItem "30"
TxtTgl.AddItem "31"
TxtTgl.AddItem "32????? Ada ngga?"
End Sub
Private Sub fotome()
'On Error GoTo hell
rec.Open "Select useraccount.* From useraccount where useraccount.username='" & usnm.Text & "'", conn, , adLockOptimistic
txtpath.Text = rec(6)
rec.Close
'IfNoErr:
'Exit Sub
'hell:
' TulisError Err.Description, Err.Number, "fotome", Me.Name
' Resume IfNoErr

End Sub
Private Sub loadpicmen()
'On Error GoTo hell
ImgLogo.Picture = LoadPicture(App.path & "/Resource/LG1.blc")
Image3.Picture = LoadPicture(App.path & "/Resource/MenuStart.blc")
imghov12.Picture = LoadPicture(App.path & "/Resource/ButtonHover.blc")
imghov11.Picture = LoadPicture(App.path & "/Resource/ButtonHover.blc")
imghov10.Picture = LoadPicture(App.path & "/Resource/ButtonHover.blc")
imghov9.Picture = LoadPicture(App.path & "/Resource/ButtonHover.blc")
imghov8.Picture = LoadPicture(App.path & "/Resource/ButtonHover.blc")
imghov7.Picture = LoadPicture(App.path & "/Resource/ButtonHover.blc")
imghov6.Picture = LoadPicture(App.path & "/Resource/ButtonHover.blc")
imghov5.Picture = LoadPicture(App.path & "/Resource/ButtonHover.blc")
imghov4.Picture = LoadPicture(App.path & "/Resource/ButtonHover.blc")
imghov3.Picture = LoadPicture(App.path & "/Resource/ButtonHover.blc")
imghov2.Picture = LoadPicture(App.path & "/Resource/ButtonHover.blc")
imghov.Picture = LoadPicture(App.path & "/Resource/ButtonHover.blc")
'IfNoErr:
'Exit Sub
'hell:
' 'MsgBox "An Error In " & Me.Name & ". See Error.log for detail", vbCritical, "Error Handling"
' TulisError Err.Description, Err.Number, "loadpicmen", Me.Name
' Resume IfNoErr

End Sub
Private Sub StyleS()
On Error Resume Next
Dim ctrl As Control
For Each ctrl In Controls
If FrmStyles.txtnamastyle.Text = "Default" Then
Exit Sub
Else
    If (TypeOf ctrl Is ButtonNix) And _
        ctrl.Name <> "cmdSwitchStyle" Then
        ctrl.ButtonType = FrmStyles.txtlButtonType.Text
        ctrl.ColorScheme = FrmStyles.txtlColorScheme.Text
        ctrl.Backcolor = FrmStyles.txtlBackcolor.Text
        ctrl.BackOver = FrmStyles.txtlBackOver.Text
        ctrl.Forecolor = FrmStyles.txtlForecolor.Text
        ctrl.ForeOver = FrmStyles.txtlForeOver.Text
       
    End If
        If (TypeOf ctrl Is BLacKFrame) And _
        ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.BackColor1 = FrmStyles.frameBackColor1.Text
         ctrl.BackColor2 = FrmStyles.frameBackColor2.Text
         ctrl.BorderColor = FrmStyles.frameBorderColor.Text
         ctrl.Forecolor = FrmStyles.frameForecolor.Text
         ctrl.TitleColor1 = FrmStyles.frameTitleColor1.Text
         ctrl.TitleColor2 = FrmStyles.frameTitleColor2.Text
         If FrmStyles.frameBackGradient.Text = 0 Then
         ctrl.BackGradient = None
         ElseIf FrmStyles.frameBackGradient.Text = 1 Then
         ctrl.BackGradient = Vertical
         ElseIf FrmStyles.frameBackGradient.Text = 2 Then
         ctrl.BackGradient = Horizontal
         End If
         
         If FrmStyles.Frametitlegradient.Text = 0 Then
         ctrl.TitleGradient = None
         ElseIf FrmStyles.Frametitlegradient.Text = 1 Then
         ctrl.TitleGradient = Vertical
         ElseIf FrmStyles.Frametitlegradient.Text = 2 Then
         ctrl.TitleGradient = Horizontal
         End If

    End If
        If (TypeOf ctrl Is BLacKText) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.TForecolor.Text
         ctrl.Backcolor = FrmStyles.TBackcolor.Text
         ctrl.BackColorMain = FrmStyles.TBackColorMain.Text
         ctrl.BorderColor = FrmStyles.TBorderColor.Text
         ctrl.FocusBackColor = FrmStyles.TFocusBackColor.Text
         ctrl.FocusBackMainColor = FrmStyles.TFocusBackMainColor.Text
         ctrl.FocusBorderColor = FrmStyles.TFocusBorderColor.Text
         ctrl.FocusForeColor = FrmStyles.TFocusForeColor.Text
    End If
        If (TypeOf ctrl Is MSFlexGrid) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.GDBackcolor.Text
         ctrl.BackColorBkg = FrmStyles.GDBackColorBkg.Text
         ctrl.BackColorSel = FrmStyles.GDBackColorSel.Text
         ctrl.BackColorFixed = FrmStyles.GDBackColorFixed.Text
         ctrl.ForeColorSel = FrmStyles.GDForeColorSel.Text
         ctrl.Forecolor = FrmStyles.GDForecolor.Text
         ctrl.ForeColorFixed = FrmStyles.GDForeColorFixed.Text
         ctrl.GridColor = FrmStyles.GDGridColor.Text
         ctrl.GridColorFixed = FrmStyles.GDGridColorFixed.Text
    End If
        If (TypeOf ctrl Is TextBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.lbltextfore.Text
         ctrl.Backcolor = FrmStyles.lbltextback.Text
    End If
        If (TypeOf ctrl Is ComboBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.cboForeColor.Text
         ctrl.Backcolor = FrmStyles.cboBackcolor.Text
    End If
        If (TypeOf ctrl Is Label) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.lblForeColor.Text
    End If
        If (TypeOf ctrl Is RichTextBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.RcBackcolor.Text
    End If
    
            If (TypeOf ctrl Is OptionButton) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.opForecolor.Text
         ctrl.Backcolor = FrmStyles.opBackcolor.Text
    End If
            If (TypeOf ctrl Is ListView) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.LBackColor.Text
    End If
    Me.Backcolor = FrmStyles.WFore.Text
    End If
Next ctrl
End Sub
Private Sub cmdhapus_Click()
If txtnota.Text = "" Or txtws.Text = "" Then
Exit Sub
Else

'If MsgBox("Hapus semua data, termasuk penjualan jika ada???", vbYesNo + vbInformation) = vbYes Then
'rec.Open "SELECT status.* FROM status WHERE status.user= '" & txtnamacli.Text & "' and status.jenis='" & txtjen.Text & "' and status.mulai ='" & txtstart.Text & "' and status.selesai ='" & txtsel.Text & "' and status.durasi ='" & txtdur.Text & "'", conn, adOpenStatic, adLockOptimistic
'If Not rec.RecordCount = 0 Then
'rec.Delete
'rec.Close
'MsgBox "Data berhasil di hapus", vbInformation, "Success"
'FrameBayar.Visible = False
'End If
'End If
rec.Open "laporan", conn, adOpenStatic, adLockOptimistic
rec.AddNew
rec(0) = txtnota.Text
rec(1) = Format(Now, "DD-MM-YYYY")
rec(2) = txtws.Text
rec(3) = txtnamacli.Text
rec(4) = txtstart.Text
rec(5) = txtsel.Text
rec(6) = txtdur.Text
rec(7) = txttot.Text
rec(8) = Format(Now, "MM")
rec(9) = Format(Now, "YYYY")
rec(10) = txtjen.Text
If lvbar.ListItems.Count = 0 Then
rec(11) = "No"
Else
rec(11) = "Yes"
End If
rec(12) = usnm.Text
rec(13) = "Cancel"
rec.Update
rec.Close

If GridStatusBayar.TextMatrix(GridStatusBayar.Row, 10) = "No" Then
rec.Open "select status.* from status where status.no_nota='" & txtnota.Text & "'", conn, adOpenStatic, adLockOptimistic
rec.Delete
rec.Close

ElseIf lvbar.ListItems.Count = 0 Then
rec.Open "select status.* from status where status.bel='" & txtnota.Text & "'", conn, adOpenStatic, adLockOptimistic
rec.Delete
rec.Close

Else
rec.Open "select penjualan.* from penjualan where penjualan.Nota= '" & txtnota.Text & "'and penjualan.jenis='" & "Jasa" & "' and penjualan.stat='" & "Pending" & "' and penjualan.cls='" & "No" & "'", conn, adOpenStatic, adLockOptimistic
rec.MoveFirst
While Not rec.EOF
rec(8) = "Approve"
rec(9) = "Yes"
rec.MoveNext
Wend
rec.Close

rec.Open "select status.* from status where status.bel='" & txtnota.Text & "'", conn, adOpenStatic, adLockOptimistic
rec.Delete
rec.Close

End If
CekRekap
txtnota.Text = ""
txtws.Text = ""
txtnamacli.Text = ""
txtstart.Text = ""
txtsel.Text = ""
txtdur.Text = ""
txttot.Text = ""
txtjen.Text = ""
lvbar.ListItems.Clear
FrameBayar.Visible = False
MsgBox "Pembayaran client di batalkan", vbInformation, "Success"
End If
End Sub
Private Sub checkoptime()
'On Error GoTo hell
rec.Open "select useraccount.* from useraccount where useraccount.level='" & "user" & "' or useraccount.level='" & "admin" & "'", conn, adOpenStatic, adLockOptimistic
If rec.RecordCount = 0 Then
rec.Close
Else
If rec(8) = Format(Now, "dd-mm-yy") Then
rec.Close
Else
rec.MoveFirst
While Not rec.EOF
rec(7) = rec(9)
rec(8) = Format(Now, "dd-mm-yy")
rec.MoveNext
Wend
rec.Close
End If
End If
'IfNoErr:
'Exit Sub
'hell:
' TulisError Err.Description, Err.Number, "checkopTime", Me.Name
' Resume IfNoErr
End Sub

